Returns a new object containing only the selected fields. See also {@link module:object-tools.without}.
@param {object} - the input object
@param {string|array} - a list of fields to return
@returns {object}
@static
354366
function select (object, fields) {
  return arrayify(fields).reduce(function (prev, curr) {
    prev[curr] = object[curr]
    return prev
  }, {})
}
658236
function getSelection (field) {
  if (typeof field !== 'object') {
    throw new TypeError('The field must be an object.')
  }

  return {
    start: field.selectionStart,
    end: field.selectionEnd
  }
}
1090556
function ( fields ) {

            var field, data = {}, key, value;

            for ( var i = fields.length - 1; i >= 0; i-- ) {

                field = fields[ i ];

                field.removeAttribute( 'name' );
                key = field.getAttribute( this.fieldNameAttribute );
                value = field.value;

                // Cater for select boxes
                if ( field.options && typeof field.selectedIndex !== "undefined" ) {
                    value = field.options[ field.selectedIndex ].value;
                }

                data[ key ] = value;

            }
            
            return data;

        }
1299145
function(object) {
		var methods = Array.prototype.slice.call(arguments).slice(1);
		if (!methods.length) {
			methods = gui.Object.ownmethods(object).filter(function(name) {
				return name[0] !== "_"; // exclude private methods
			});
		}
		methods.forEach(function(name) {
			object[name] = object[name].bind(object);
		});
		return object;
	}
380835
public Match exclude(String... fields) {
    if(fields != null) {
      excludes.addAll(Arrays.asList(fields));
    }
    return this;
  }
293622
function () {
                var res = [];
                this._removeAllToArray(this._objectKeys, res);
                this._objectKeys = null;
                this._removeAllToArray(this._stringKeys, res);
                this._stringKeys = null;
                this._removeAllToArray(this._numberKeys, res);
                this._numberKeys = null;
                this._removeAllToArray(this._otherKeys, res);
                this._otherKeys = null;
                return res;
            }
1177653
public function exclude($fieldName = null)
    {
        if ( ! isset($this->query['select'])) {
            $this->query['select'] = array();
        }

        $fieldNames = is_array($fieldName) ? $fieldName : func_get_args();

        foreach ($fieldNames as $fieldName) {
            $this->query['select'][$fieldName] = 0;
        }

        return $this;
    }
121533
function hasField(selection, fieldNames) {
  if (!selection || selection.type === 'empty') {
    return false;
  }
  const fieldsToLookup = [].concat(fieldNames);

  if (selection.type === 'range') {
    const fields = Object.keys(selection.range.variables);
    const match = intersect(fieldsToLookup, fields);
    return match.length > 0;
  }
  if (selection.type === 'partition') {
    return fieldsToLookup.indexOf(selection.partition.variable) !== -1;
  }

  console.log(
    'SelectionBuilder::hasField does not handle selection of type',
    selection.type
  );

  return false;
}
563687
def only(self, *fields):
        '''
        
        '''
        s = self._clone()
        if len(fields) == 1 and fields[0] == '__model':
            s._only = '__model'
        else:
            s._only = fields
        return s
258012
function omit(obj, remove) {
  var result = {};
  if (typeof remove === 'string') {
    remove = [].slice.call(arguments, 1);
  }
  for (var prop in obj) {
    if (!obj.hasOwnProperty || obj.hasOwnProperty(prop)) {
      if (remove.indexOf(prop) === -1) {
        result[prop] = obj[prop];
      }
    }
  }
  return result;
}
476514
function omit (obj, props) {
  props = Array.prototype.slice.call(arguments, 1);
  var keys = Object.keys(obj);
  var newObj = {};

  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];

    if (props.indexOf(key) === -1) {
      newObj[key] = obj[key];
    }
  }

  return newObj;
}
730624
function pick(obj) {
  var copy = {};
  var keys = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1));
  forEach(keys, function(key) {
    if (key in obj) copy[key] = obj[key];
  });
  return copy;
}
746012
function getField(field) {
  return function map(element) {
    if (element) {
      if (Array.isArray(element)) {
        return element.map(map).join('');
      }
      else if (typeof element === 'string') {
        return element;
      }
      else if (typeof element === 'object') {
        return element[field];
      }
    }
    return '';
  };
}
333307
function() {

    var params = Object.assign({},this)

    if( params.value === 'text' ) {
      params.value = void 0
      delete params.value
    }

    var data = [ this._field, params, this.value || 'text' ]

    switch( this._field ) {
      default: data.push( this._data ); break
      case 'adr':
      case 'n':
        data.push( this._data.split( ';' ) )
    }

    return data

  }
546466
function massageSelector(input) {
  var result = pouchdbUtils.clone(input);
  var wasAnded = false;
  if ('$and' in result) {
    result = mergeAndedSelectors(result['$and']);
    wasAnded = true;
  }

  ['$or', '$nor'].forEach(function (orOrNor) {
    if (orOrNor in result) {
      // message each individual selector
      // e.g. {foo: 'bar'} becomes {foo: {$eq: 'bar'}}
      result[orOrNor].forEach(function (subSelector) {
        var fields = Object.keys(subSelector);
        for (var i = 0; i < fields.length; i++) {
          var field = fields[i];
          var matcher = subSelector[field];
          if (typeof matcher !== 'object' || matcher === null) {
            subSelector[field] = {$eq: matcher};
          }
        }
      });
    }
  });

  if ('$not' in result) {
    //This feels a little like forcing, but it will work for now,
    //I would like to come back to this and make the merging of selectors a little more generic
    result['$not'] = mergeAndedSelectors([result['$not']]);
  }

  var fields = Object.keys(result);

  for (var i = 0; i < fields.length; i++) {
    var field = fields[i];
    var matcher = result[field];

    if (typeof matcher !== 'object' || matcher === null) {
      matcher = {$eq: matcher};
    } else if ('$ne' in matcher && !wasAnded) {
      // I put these in an array, since there may be more than one
      // but in the "mergeAnded" operation, I already take care of that
      matcher.$ne = [matcher.$ne];
    }
    result[field] = matcher;
  }

  return result;
}
1246726
private static Field getDeclaredField(Object object, String fieldName) throws NoSuchFieldException {
        Assert.notNull(object);
        return getDeclaredField(object.getClass(), fieldName);
    }
412920
function massageSelector(input) {
  var result = utils.clone(input);
  var wasAnded = false;
  if ('$and' in result) {
    result = mergeAndedSelectors(result['$and']);
    wasAnded = true;
  }

  if ('$not' in result) {
    //This feels a little like forcing, but it will work for now,
    //I would like to come back to this and make the merging of selectors a little more generic
    result['$not'] = mergeAndedSelectors([result['$not']]);
  }

  var fields = Object.keys(result);

  for (var i = 0; i < fields.length; i++) {
    var field = fields[i];
    var matcher = result[field];

    if (typeof matcher !== 'object' || matcher === null) {
      matcher = {$eq: matcher};
    } else if ('$ne' in matcher && !wasAnded) {
      // I put these in an array, since there may be more than one
      // but in the "mergeAnded" operation, I already take care of that
      matcher.$ne = [matcher.$ne];
    }
    result[field] = matcher;
  }

  return result;
}