root / HServer / 00.Server / 00.Program / node_modules / lodash / tail.js
이력 | 보기 | 이력해설 | 다운로드 (457 Bytes)
| 1 | 39 | HKM | var baseSlice = require('./_baseSlice'); |
|---|---|---|---|
| 2 | |||
| 3 | /**
|
||
| 4 | * Gets all but the first element of `array`.
|
||
| 5 | *
|
||
| 6 | * @static
|
||
| 7 | * @memberOf _
|
||
| 8 | * @since 4.0.0
|
||
| 9 | * @category Array
|
||
| 10 | * @param {Array} array The array to query.
|
||
| 11 | * @returns {Array} Returns the slice of `array`.
|
||
| 12 | * @example
|
||
| 13 | *
|
||
| 14 | * _.tail([1, 2, 3]);
|
||
| 15 | * // => [2, 3]
|
||
| 16 | */
|
||
| 17 | function tail(array) { |
||
| 18 | var length = array == null ? 0 : array.length; |
||
| 19 | return length ? baseSlice(array, 1, length) : []; |
||
| 20 | } |
||
| 21 | |||
| 22 | module.exports = tail; |