Security update for permissions_by_term
[yaffs-website] / node_modules / uncss / 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;