lodash.forin
Advanced tools
Comparing version 3.0.0 to 3.0.1
29
index.js
/** | ||
* 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.2 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
@@ -14,5 +14,21 @@ * Available under MIT license <https://lodash.com/license> | ||
/** | ||
* Creates a function for `_.forIn` or `_.forInRight`. | ||
* | ||
* @private | ||
* @param {Function} objectFunc The function to iterate over an object. | ||
* @returns {Function} Returns the new each function. | ||
*/ | ||
function createForIn(objectFunc) { | ||
return function(object, iteratee, thisArg) { | ||
if (typeof iteratee != 'function' || typeof thisArg != 'undefined') { | ||
iteratee = bindCallback(iteratee, thisArg, 3); | ||
} | ||
return objectFunc(object, iteratee, keysIn); | ||
}; | ||
} | ||
/** | ||
* Iterates over own and inherited enumerable properties of an object invoking | ||
* `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked | ||
* with three arguments; (value, key, object). Iterator functions may exit | ||
* with three arguments: (value, key, object). Iterator functions may exit | ||
* iteration early by explicitly returning `false`. | ||
@@ -41,9 +57,4 @@ * | ||
*/ | ||
function forIn(object, iteratee, thisArg) { | ||
if (typeof iteratee != 'function' || typeof thisArg != 'undefined') { | ||
iteratee = bindCallback(iteratee, thisArg, 3); | ||
} | ||
return baseFor(object, iteratee, keysIn); | ||
} | ||
var forIn = createForIn(baseFor); | ||
module.exports = forIn; |
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/> | ||
@@ -4,0 +4,0 @@ |
{ | ||
"name": "lodash.forin", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "The modern build of lodash’s `_.forIn` as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash.forin v3.0.0 | ||
# lodash.forin v3.0.1 | ||
@@ -20,2 +20,2 @@ The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.forIn` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. | ||
See the [documentation](https://lodash.com/docs#forIn) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.forin) for more details. | ||
See the [documentation](https://lodash.com/docs#forIn) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.forin) for more details. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4698
55