Socket
Socket
Sign inDemoInstall

lodash.size

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.size - npm Package Compare versions

Comparing version 4.0.5 to 4.0.6

57

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

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

/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;

@@ -110,3 +113,4 @@

/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.

@@ -130,7 +134,7 @@ */

/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = DataView ? (DataView + '') : '',
mapCtorString = Map ? funcToString.call(Map) : '',
promiseCtorString = Promise ? funcToString.call(Promise) : '',
setCtorString = Set ? funcToString.call(Set) : '',
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';
var dataViewCtorString = toSource(DataView),
mapCtorString = toSource(Map),
promiseCtorString = toSource(Promise),
setCtorString = toSource(Set),
weakMapCtorString = toSource(WeakMap);

@@ -196,4 +200,4 @@ /**

var result = objectToString.call(value),
Ctor = result == objectTag ? value.constructor : null,
ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';
Ctor = result == objectTag ? value.constructor : undefined,
ctorString = Ctor ? toSource(Ctor) : undefined;

@@ -214,2 +218,21 @@ if (ctorString) {

/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to process.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
/**
* Gets the size of `collection` by returning its length for array-like

@@ -367,4 +390,5 @@ * values or the number of own enumerable string keyed properties for objects.

/**
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*

@@ -443,10 +467,7 @@ * @static

function isNative(value) {
if (value == null) {
if (!isObject(value)) {
return false;
}
if (isFunction(value)) {
return reIsNative.test(funcToString.call(value));
}
return isObjectLike(value) &&
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}

@@ -453,0 +474,0 @@

{
"name": "lodash.size",
"version": "4.0.5",
"version": "4.0.6",
"description": "The lodash method `_.size` exported as a module.",

@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/",

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

# lodash.size v4.0.5
# lodash.size v4.0.6

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

See the [documentation](https://lodash.com/docs#size) or [package source](https://github.com/lodash/lodash/blob/4.0.5-npm-packages/lodash.size) for more details.
See the [documentation](https://lodash.com/docs#size) or [package source](https://github.com/lodash/lodash/blob/4.0.6-npm-packages/lodash.size) 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