Sha256: 4edd40dac0897bc73302f2104663d475b186f26ca6443997a34c80a19fb14a0c

Contents?: true

Size: 939 Bytes

Versions: 261

Compression:

Stored size: 939 Bytes

Contents

var baseUnset = require('./_baseUnset'),
    isIndex = require('./_isIndex');

/** Used for built-in method references. */
var arrayProto = Array.prototype;

/** Built-in value references. */
var splice = arrayProto.splice;

/**
 * The base implementation of `_.pullAt` without support for individual
 * indexes or capturing the removed elements.
 *
 * @private
 * @param {Array} array The array to modify.
 * @param {number[]} indexes The indexes of elements to remove.
 * @returns {Array} Returns `array`.
 */
function basePullAt(array, indexes) {
  var length = array ? indexes.length : 0,
      lastIndex = length - 1;

  while (length--) {
    var index = indexes[length];
    if (length == lastIndex || index !== previous) {
      var previous = index;
      if (isIndex(index)) {
        splice.call(array, index, 1);
      } else {
        baseUnset(array, index);
      }
    }
  }
  return array;
}

module.exports = basePullAt;

Version data entries

261 entries across 260 versions & 28 rubygems

Version Path
trusty-cms-6.3.1 node_modules/lodash/_basePullAt.js
immosquare-cleaner-0.1.51 node_modules/lodash/_basePullAt.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/lodash/_basePullAt.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js
immosquare-cleaner-0.1.50 node_modules/lodash/_basePullAt.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js
clapton-0.0.19 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js
clapton-0.0.18 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js
clapton-0.0.17 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js
clapton-0.0.16 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js
clapton-0.0.15 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js
immosquare-cleaner-0.1.49 node_modules/lodash/_basePullAt.js
clapton-0.0.14 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js
immosquare-cleaner-0.1.48 node_modules/lodash/_basePullAt.js
clapton-0.0.13 lib/clapton/javascripts/node_modules/lodash/_basePullAt.js