lodash.forin
Advanced tools
Comparing version 4.0.2 to 4.1.0
52
index.js
/** | ||
* lodash 4.0.2 (Custom Build) <https://lodash.com/> | ||
* lodash 4.1.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="npm" -o ./` | ||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> | ||
* Copyright jQuery Foundation and other contributors <https://jquery.org/> | ||
* Released under MIT license <https://lodash.com/license> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
*/ | ||
var baseFor = require('lodash._basefor'), | ||
baseIteratee = require('lodash._baseiteratee'), | ||
keysIn = require('lodash.keysin'); | ||
/** | ||
* Casts `value` to `identity` if it's not a function. | ||
* Iterates over own and inherited enumerable string keyed properties of an | ||
* object invoking `iteratee` for each property. The iteratee is invoked with | ||
* three arguments: (value, key, object). Iteratee functions may exit iteration | ||
* early by explicitly returning `false`. | ||
* | ||
* @private | ||
* @param {*} value The value to inspect. | ||
* @returns {Array} Returns the array-like object. | ||
*/ | ||
function baseCastFunction(value) { | ||
return typeof value == 'function' ? value : identity; | ||
} | ||
/** | ||
* Iterates over own and inherited enumerable properties of an object invoking | ||
* `iteratee` for each property. The iteratee is invoked with three arguments: | ||
* (value, key, object). Iteratee functions may exit iteration early by explicitly | ||
* returning `false`. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @since 0.3.0 | ||
* @category Object | ||
@@ -47,3 +38,3 @@ * @param {Object} object The object to iterate over. | ||
* }); | ||
* // => logs 'a', 'b', then 'c' (iteration order is not guaranteed) | ||
* // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). | ||
*/ | ||
@@ -53,24 +44,5 @@ function forIn(object, iteratee) { | ||
? object | ||
: baseFor(object, baseCastFunction(iteratee), keysIn); | ||
: baseFor(object, baseIteratee(iteratee), keysIn); | ||
} | ||
/** | ||
* This method returns the first argument given to it. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Util | ||
* @param {*} value Any value. | ||
* @returns {*} Returns `value`. | ||
* @example | ||
* | ||
* var object = { 'user': 'fred' }; | ||
* | ||
* _.identity(object) === object; | ||
* // => true | ||
*/ | ||
function identity(value) { | ||
return value; | ||
} | ||
module.exports = forIn; |
{ | ||
"name": "lodash.forin", | ||
"version": "4.0.2", | ||
"version": "4.1.0", | ||
"description": "The lodash method `_.forIn` exported as a module.", | ||
@@ -19,4 +19,5 @@ "homepage": "https://lodash.com/", | ||
"lodash._basefor": "~3.0.0", | ||
"lodash._baseiteratee": "~4.6.0", | ||
"lodash.keysin": "^4.0.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# lodash.forin v4.0.2 | ||
# lodash.forin v4.1.0 | ||
@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.forIn` exported as a [Node.js](https://nodejs.org/) module. | ||
See the [documentation](https://lodash.com/docs#forIn) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.forin) for more details. | ||
See the [documentation](https://lodash.com/docs#forIn) or [package source](https://github.com/lodash/lodash/blob/4.1.0-npm-packages/lodash.forin) for more details. |
Sorry, the diff of this file is not supported yet
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
Mixed license
License(Experimental) Package contains multiple licenses.
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
4713
3
1
44
+ Addedlodash._baseiteratee@~4.6.0
+ Addedlodash._baseiteratee@4.6.1(transitive)
+ Addedlodash._stringtopath@4.7.1(transitive)