mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Bump to v4.0.2.
This commit is contained in:
@@ -1,22 +1,23 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.times v4.0.1
|
||||
# lodash.times v4.0.2
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.times` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var times = require('lodash.times');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#times) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.times) for more details.
|
||||
See the [documentation](https://lodash.com/docs#times) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.times) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 4.0.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.0.2 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
@@ -67,13 +67,13 @@ var objectToString = objectProto.toString;
|
||||
var nativeMin = Math.min;
|
||||
|
||||
/**
|
||||
* Converts `value` to a function if it's not one.
|
||||
* Casts `value` to `identity` if it's not a function.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to process.
|
||||
* @returns {Function} Returns the function.
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {Array} Returns the array-like object.
|
||||
*/
|
||||
function toFunction(value) {
|
||||
function baseCastFunction(value) {
|
||||
return typeof value == 'function' ? value : identity;
|
||||
}
|
||||
|
||||
@@ -95,8 +95,8 @@ function toFunction(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array constructors, and
|
||||
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -223,8 +223,8 @@ function identity(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes the iteratee function `n` times, returning an array of the results
|
||||
* of each invocation. The iteratee is invoked with one argument; (index).
|
||||
* Invokes the iteratee `n` times, returning an array of the results of
|
||||
* each invocation. The iteratee is invoked with one argument; (index).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -248,7 +248,7 @@ function times(n, iteratee) {
|
||||
var index = MAX_ARRAY_LENGTH,
|
||||
length = nativeMin(n, MAX_ARRAY_LENGTH);
|
||||
|
||||
iteratee = toFunction(iteratee);
|
||||
iteratee = baseCastFunction(iteratee);
|
||||
n -= MAX_ARRAY_LENGTH;
|
||||
|
||||
var result = baseTimes(length, iteratee);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.times",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.2",
|
||||
"description": "The lodash method `_.times` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
Reference in New Issue
Block a user