summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/lodash/_basePullAt.js
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wiki/ImportarDesdeURL/node_modules/lodash/_basePullAt.js')
-rw-r--r--bin/wiki/ImportarDesdeURL/node_modules/lodash/_basePullAt.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/bin/wiki/ImportarDesdeURL/node_modules/lodash/_basePullAt.js b/bin/wiki/ImportarDesdeURL/node_modules/lodash/_basePullAt.js
new file mode 100644
index 00000000..c3e9e710
--- /dev/null
+++ b/bin/wiki/ImportarDesdeURL/node_modules/lodash/_basePullAt.js
@@ -0,0 +1,37 @@
+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;