projects
/
yaffs-website
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Added Entity and Entity Reference Revisions which got dropped somewhere along the...
[yaffs-website]
/
node_modules
/
grunt-legacy-util
/
node_modules
/
lodash
/
head.js
1
/**
2
* Gets the first element of `array`.
3
*
4
* @static
5
* @memberOf _
6
* @alias first
7
* @category Array
8
* @param {Array} array The array to query.
9
* @returns {*} Returns the first element of `array`.
10
* @example
11
*
12
* _.head([1, 2, 3]);
13
* // => 1
14
*
15
* _.head([]);
16
* // => undefined
17
*/
18
function head(array) {
19
return array ? array[0] : undefined;
20
}
21
22
module.exports = head;