Socket
Socket
Sign inDemoInstall

lodash._baseset

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash._baseset - npm Package Compare versions

Comparing version 4.2.1 to 4.3.0

62

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

@@ -12,3 +12,4 @@ * Copyright jQuery Foundation and other contributors <https://jquery.org/>

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
var INFINITY = 1 / 0,
MAX_SAFE_INTEGER = 9007199254740991;

@@ -25,16 +26,2 @@ /** `Object#toString` result references. */

/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
length = length == null ? MAX_SAFE_INTEGER : length;
return value > -1 && value % 1 == 0 && value < length;
}
/** Used for built-in method references. */

@@ -90,3 +77,3 @@ var objectProto = Object.prototype;

while (nested != null && ++index < length) {
var key = path[index];
var key = toKey(path[index]);
if (isObject(nested)) {

@@ -122,2 +109,17 @@ var newValue = value;

/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(typeof value == 'number' || reIsUint.test(value)) &&
(value > -1 && value % 1 == 0 && value < length);
}
/**
* Checks if `value` is a property name and not a property path.

@@ -131,12 +133,30 @@ *

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;
}
/**
* Performs a

@@ -143,0 +163,0 @@ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)

{
"name": "lodash._baseset",
"version": "4.2.1",
"version": "4.3.0",
"description": "The internal lodash function `baseSet` exported as a module.",

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

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

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

# lodash._baseset v4.2.1
# lodash._baseset v4.3.0

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

See the [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash._baseset) for more details.
See the [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash._baseset) for more details.
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