code: function getColorset(pObj, filter, sorter) {
      var filterFunc = (
          // Regex to a function
          (filter.test && filter.test.bind(filter)) ||
  
          // Fallback to a normal function
          filter
      );
  
      return _.chain(pObj)
      .pairs()
      .filter(_.compose(filterFunc, _.first))
      .sortBy(sorter)
      .pluck(1)
      .map(parseColor)
      .value();
  }
docs: pObj: Parsed plist object filter: Regex or filter function sorter: Optional sorting functon