mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Bump to v3.0.1.
This commit is contained in:
committed by
John-David Dalton
parent
bb53dde973
commit
60b8329a73
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.toarray v3.0.0
|
||||
# lodash.toarray v3.0.1
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.toArray` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var toArray = require('lodash.toarray');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#toArray) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.toarray) for more details.
|
||||
See the [documentation](https://lodash.com/docs#toArray) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.toarray) for more details.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.0.1 (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.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
@@ -16,6 +16,31 @@ var arrayCopy = require('lodash._arraycopy'),
|
||||
*/
|
||||
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.property` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {string} key The key of the property to get.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseProperty(key) {
|
||||
return function(object) {
|
||||
return object == null ? undefined : object[key];
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
|
||||
* that affects Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
@@ -45,7 +70,7 @@ function isLength(value) {
|
||||
* // => [2, 3]
|
||||
*/
|
||||
function toArray(value) {
|
||||
var length = value ? value.length : 0;
|
||||
var length = value ? getLength(value) : 0;
|
||||
if (!isLength(length)) {
|
||||
return values(value);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.toarray",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"description": "The modern build of lodash’s `_.toArray` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
Reference in New Issue
Block a user