mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Bump to v4.14.2.
This commit is contained in:
5
tail.js
5
tail.js
@@ -1,4 +1,4 @@
|
||||
define(['./drop'], function(drop) {
|
||||
define(['./_baseSlice'], function(baseSlice) {
|
||||
|
||||
/**
|
||||
* Gets all but the first element of `array`.
|
||||
@@ -15,7 +15,8 @@ define(['./drop'], function(drop) {
|
||||
* // => [2, 3]
|
||||
*/
|
||||
function tail(array) {
|
||||
return drop(array, 1);
|
||||
var length = array ? array.length : 0;
|
||||
return length ? baseSlice(array, 1, length) : [];
|
||||
}
|
||||
|
||||
return tail;
|
||||
|
||||
Reference in New Issue
Block a user