Bump to v3.1.0.

This commit is contained in:
jdalton
2015-05-25 16:51:22 -07:00
committed by John-David Dalton
parent f11f2385a6
commit 27d65e814a
409 changed files with 6049 additions and 3061 deletions

View File

@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
Permission is hereby granted, free of charge, to any person obtaining

View File

@@ -1,4 +1,4 @@
# lodash.pullat v3.0.0
# lodash.pullat v3.1.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodashs](https://lodash.com/) `_.pullAt` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var pullAt = require('lodash.pullat');
```
See the [documentation](https://lodash.com/docs#pullAt) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.pullat) for more details.
See the [documentation](https://lodash.com/docs#pullAt) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.pullat) for more details.

View File

@@ -1,14 +1,15 @@
/**
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
var baseAt = require('lodash._baseat'),
baseCompareAscending = require('lodash._basecompareascending'),
baseFlatten = require('lodash._baseflatten');
baseFlatten = require('lodash._baseflatten'),
restParam = require('lodash.restparam');
/** Used for native method references. */
var arrayProto = Array.prototype;
@@ -17,36 +18,11 @@ var arrayProto = Array.prototype;
var splice = arrayProto.splice;
/**
* Used as the maximum length of an array-like value.
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
* for more details.
* Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
* of an array-like value.
*/
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
/**
* The base implementation of `_.pullAt` without support for individual
* index arguments.
*
* @private
* @param {Array} array The array to modify.
* @param {number[]} indexes The indexes of elements to remove.
* @returns {Array} Returns the new array of removed elements.
*/
function basePullAt(array, indexes) {
var length = indexes.length,
result = baseAt(array, indexes);
indexes.sort(baseCompareAscending);
while (length--) {
var index = parseFloat(indexes[length]);
if (index != previous && isIndex(index)) {
var previous = index;
splice.call(array, index, 1);
}
}
return result;
}
/**
* Checks if `value` is a valid array-like index.
*
@@ -86,8 +62,22 @@ function isIndex(value, length) {
* console.log(evens);
* // => [10, 20]
*/
function pullAt(array) {
return basePullAt(array || [], baseFlatten(arguments, false, false, 1));
}
var pullAt = restParam(function(array, indexes) {
array || (array = []);
indexes = baseFlatten(indexes);
var length = indexes.length,
result = baseAt(array, indexes);
indexes.sort(baseCompareAscending);
while (length--) {
var index = parseFloat(indexes[length]);
if (index != previous && isIndex(index)) {
var previous = index;
splice.call(array, index, 1);
}
}
return result;
});
module.exports = pullAt;

View File

@@ -1,6 +1,6 @@
{
"name": "lodash.pullat",
"version": "3.0.0",
"version": "3.1.0",
"description": "The modern build of lodashs `_.pullAt` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -19,6 +19,7 @@
"dependencies": {
"lodash._baseat": "^3.0.0",
"lodash._basecompareascending": "^3.0.0",
"lodash._baseflatten": "^3.0.0"
"lodash._baseflatten": "^3.0.0",
"lodash.restparam": "^3.0.0"
}
}