Security update for permissions_by_term
[yaffs-website] / node_modules / uncss / node_modules / lodash / reverse.js
1 /** Used for built-in method references. */
2 var arrayProto = global.Array.prototype;
3
4 /* Built-in method references for those with the same name as other `lodash` methods. */
5 var nativeReverse = arrayProto.reverse;
6
7 /**
8  * Reverses `array` so that the first element becomes the last, the second
9  * element becomes the second to last, and so on.
10  *
11  * **Note:** This method mutates `array` and is based on
12  * [`Array#reverse`](https://mdn.io/Array/reverse).
13  *
14  * @static
15  * @memberOf _
16  * @category Array
17  * @returns {Array} Returns `array`.
18  * @example
19  *
20  * var array = [1, 2, 3];
21  *
22  * _.reverse(array);
23  * // => [3, 2, 1]
24  *
25  * console.log(array);
26  * // => [3, 2, 1]
27  */
28 function reverse(array) {
29   return array ? nativeReverse.call(array) : array;
30 }
31
32 module.exports = reverse;