COLLECTED BY
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
The Wayback Machine - https://web.archive.org/web/20201220221134/https://github.com/lodash/lodash/blob/master/head.js
Permalink
Cannot retrieve contributors at this time
24 lines (23 sloc)
408 Bytes
/**
* Gets the first element of `array`.
*
* @since 0.1.0
* @alias first
* @category Array
* @param {Array } array The array to query.
* @returns {* } Returns the first element of `array`.
* @see last
* @example
*
* head([1, 2, 3])
* // => 1
*
* head([])
* // => undefined
*/
function head ( array ) {
return ( array != null && array . length )
? array [ 0 ]
: undefined
}
export default head
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.