Bump to v3.0.3.

This commit is contained in:
jdalton
2015-02-13 09:18:57 -08:00
committed by John-David Dalton
parent e2db58867b
commit 415e8ce0ed
156 changed files with 599 additions and 625 deletions

View File

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

View File

@@ -1,5 +1,5 @@
/**
* lodash 3.0.2 (Custom Build) <https://lodash.com/>
* lodash 3.0.3 (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.8.3 <http://underscorejs.org/LICENSE>
@@ -46,7 +46,7 @@ function baseProperty(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)
* in Safari on iOS 8.1 ARM64.
* that affects Safari on at least iOS 8.1-8.3 ARM64.
*
* @private
* @param {Object} object The object to query.
@@ -54,6 +54,17 @@ function baseProperty(key) {
*/
var getLength = baseProperty('length');
/**
* Checks if `value` is array-like.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
*/
function isArrayLike(value) {
return value != null && isLength(getLength(value));
}
/**
* Checks if `value` is a valid array-like length.
*
@@ -98,10 +109,9 @@ function isEmpty(value) {
if (value == null) {
return true;
}
var length = getLength(value);
if (isLength(length) && (isArray(value) || isString(value) || isArguments(value) ||
if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) ||
(isObjectLike(value) && isFunction(value.splice)))) {
return !length;
return !value.length;
}
return !keys(value).length;
}

View File

@@ -1,6 +1,6 @@
{
"name": "lodash.isempty",
"version": "3.0.2",
"version": "3.0.3",
"description": "The modern build of lodashs `_.isEmpty` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",