1 var baseSlice = require('./_baseSlice'),
2 toInteger = require('./toInteger');
5 * Creates a slice of `array` with `n` elements dropped from the beginning.
11 * @param {Array} array The array to query.
12 * @param {number} [n=1] The number of elements to drop.
13 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
14 * @returns {Array} Returns the slice of `array`.
20 * _.drop([1, 2, 3], 2);
23 * _.drop([1, 2, 3], 5);
26 * _.drop([1, 2, 3], 0);
29 function drop(array, n, guard) {
30 var length = array == null ? 0 : array.length;
34 n = (guard || n === undefined) ? 1 : toInteger(n);
35 return baseSlice(array, n < 0 ? 0 : n, length);
38 module.exports = drop;