Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lodash.forin

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.forin - npm Package Compare versions

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc