lodash.isempty
Advanced tools
+39
-18
| /** | ||
| * lodash 4.2.0 (Custom Build) <https://lodash.com/> | ||
| * lodash 4.2.1 (Custom Build) <https://lodash.com/> | ||
| * Build: `lodash modularize exports="npm" -o ./` | ||
@@ -28,3 +28,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; | ||
@@ -85,3 +88,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. | ||
@@ -112,7 +116,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); | ||
@@ -178,4 +182,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; | ||
@@ -196,2 +200,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 ''; | ||
| } | ||
| /** | ||
| * Checks if `value` is likely an `arguments` object. | ||
@@ -438,4 +461,5 @@ * | ||
| /** | ||
| * 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('')`) | ||
| * | ||
@@ -514,10 +538,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)); | ||
| } | ||
@@ -524,0 +545,0 @@ |
+1
-1
| { | ||
| "name": "lodash.isempty", | ||
| "version": "4.2.0", | ||
| "version": "4.2.1", | ||
| "description": "The lodash method `_.isEmpty` exported as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
+2
-2
@@ -1,2 +0,2 @@ | ||
| # lodash.isempty v4.2.0 | ||
| # lodash.isempty v4.2.1 | ||
@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.isEmpty` exported as a [Node.js](https://nodejs.org/) module. | ||
| See the [documentation](https://lodash.com/docs#isEmpty) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.isempty) for more details. | ||
| See the [documentation](https://lodash.com/docs#isEmpty) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.isempty) for more details. |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
18047
1.36%545
3.81%5
25%