merging in #324 as _.initial

This commit is contained in:
Jeremy Ashkenas
2011-10-05 15:32:34 -04:00
parent dcda142655
commit ac191a28a5
2 changed files with 8 additions and 8 deletions

View File

@@ -327,7 +327,7 @@
// the arguments object. Passing **n** will return all the values in
// the array, excluding the last N. The **guard** check allows it to work with
// `_.map`.
_.init = function(array, n, guard) {
_.initial = function(array, n, guard) {
return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
};