Sha256: c55eca402a555310428b12c17bae0e0e9232d228163d51ae17751b2a65039380
Contents?: true
Size: 384 Bytes
Versions: 167
Compression:
Stored size: 384 Bytes
Contents
/** * Gets the first element of `array`. * * @static * @memberOf _ * @alias head * @category Array * @param {Array} array The array to query. * @returns {*} Returns the first element of `array`. * @example * * _.first([1, 2, 3]); * // => 1 * * _.first([]); * // => undefined */ function first(array) { return array ? array[0] : undefined; } module.exports = first;
Version data entries
167 entries across 87 versions & 9 rubygems