1 var baseToPath = require('./_baseToPath'),
2 isIndex = require('./_isIndex'),
3 isKey = require('./_isKey'),
4 last = require('./last'),
5 parent = require('./_parent');
7 /** Used for built-in method references. */
8 var arrayProto = Array.prototype;
10 /** Built-in value references. */
11 var splice = arrayProto.splice;
14 * The base implementation of `_.pullAt` without support for individual
15 * indexes or capturing the removed elements.
18 * @param {Array} array The array to modify.
19 * @param {number[]} indexes The indexes of elements to remove.
20 * @returns {Array} Returns `array`.
22 function basePullAt(array, indexes) {
23 var length = array ? indexes.length : 0,
24 lastIndex = length - 1;
27 var index = indexes[length];
28 if (lastIndex == length || index != previous) {
31 splice.call(array, index, 1);
33 else if (!isKey(index, array)) {
34 var path = baseToPath(index),
35 object = parent(array, path);
38 delete object[last(path)];
49 module.exports = basePullAt;