Socket
Socket
Sign inDemoInstall

lodash.get

Package Overview
Dependencies
2
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.1 to 4.3.0

33

index.js
/**
* lodash 4.2.1 (Custom Build) <https://lodash.com/>
* lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`

@@ -11,2 +11,5 @@ * Copyright jQuery Foundation and other contributors <https://jquery.org/>

/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/** `Object#toString` result references. */

@@ -44,3 +47,3 @@ var symbolTag = '[object Symbol]';

while (object != null && index < length) {
object = object[path[index++]];
object = object[toKey(path[index++])];
}

@@ -70,12 +73,30 @@ return (index && index == length) ? object : undefined;

function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol') {
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
value == null || isSymbol(value)) {
return true;
}
return !isArray(value) &&
(isSymbol(value) || reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(object != null && value in Object(object)));
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(object != null && value in Object(object));
}
/**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
* @param {*} value The value to inspect.
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
/**
* Checks if `value` is classified as an `Array` object.

@@ -82,0 +103,0 @@ *

4

package.json
{
"name": "lodash.get",
"version": "4.2.1",
"version": "4.3.0",
"description": "The lodash method `_.get` exported as a module.",

@@ -18,4 +18,4 @@ "homepage": "https://lodash.com/",

"dependencies": {
"lodash._stringtopath": "~4.7.0"
"lodash._stringtopath": "~4.8.0"
}
}

@@ -1,2 +0,2 @@

# lodash.get v4.2.1
# lodash.get v4.3.0

@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.get` exported as a [Node.js](https://nodejs.org/) module.

See the [documentation](https://lodash.com/docs#get) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.get) for more details.
See the [documentation](https://lodash.com/docs#get) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.get) for more details.
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc