@rimbu/base
Advanced tools
Comparing version 0.9.1 to 0.9.2
@@ -12,13 +12,7 @@ "use strict"; | ||
function isPlainObj(obj) { | ||
if (undefined === obj || | ||
null === obj || | ||
typeof obj !== 'object' || | ||
(obj.constructor instanceof Function && | ||
obj.constructor.name !== 'Object') || | ||
Symbol.iterator in obj || | ||
Symbol.asyncIterator in obj) { | ||
return false; | ||
} | ||
var prototype = Object.getPrototypeOf(obj); | ||
return null === prototype || prototype === Object.prototype; | ||
return (typeof obj === 'object' && | ||
null !== obj && | ||
(obj.constructor === Object || !(obj.constructor instanceof Function)) && | ||
!(Symbol.iterator in obj) && | ||
!(Symbol.asyncIterator in obj)); | ||
} | ||
@@ -25,0 +19,0 @@ exports.isPlainObj = isPlainObj; |
@@ -9,13 +9,7 @@ /** | ||
export function isPlainObj(obj) { | ||
if (undefined === obj || | ||
null === obj || | ||
typeof obj !== 'object' || | ||
(obj.constructor instanceof Function && | ||
obj.constructor.name !== 'Object') || | ||
Symbol.iterator in obj || | ||
Symbol.asyncIterator in obj) { | ||
return false; | ||
} | ||
const prototype = Object.getPrototypeOf(obj); | ||
return null === prototype || prototype === Object.prototype; | ||
return (typeof obj === 'object' && | ||
null !== obj && | ||
(obj.constructor === Object || !(obj.constructor instanceof Function)) && | ||
!(Symbol.iterator in obj) && | ||
!(Symbol.asyncIterator in obj)); | ||
} | ||
@@ -22,0 +16,0 @@ /** |
{ | ||
"name": "@rimbu/base", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "Utilities to implement Rimbu collections", | ||
@@ -54,3 +54,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@rimbu/common": "^0.9.4", | ||
"@rimbu/common": "^0.10.0", | ||
"tslib": "^2.4.0" | ||
@@ -65,3 +65,3 @@ }, | ||
}, | ||
"gitHead": "60d3b52050fc30f10921cbf92d637362d663d7e0" | ||
"gitHead": "4d6b7411c36f599331185b1bc597e58f34954d1a" | ||
} |
@@ -57,17 +57,9 @@ /** | ||
export function isPlainObj(obj: any): boolean { | ||
if ( | ||
undefined === obj || | ||
null === obj || | ||
typeof obj !== 'object' || | ||
(obj.constructor instanceof Function && | ||
obj.constructor.name !== 'Object') || | ||
Symbol.iterator in obj || | ||
Symbol.asyncIterator in obj | ||
) { | ||
return false; | ||
} | ||
const prototype = Object.getPrototypeOf(obj); | ||
return null === prototype || prototype === Object.prototype; | ||
return ( | ||
typeof obj === 'object' && | ||
null !== obj && | ||
(obj.constructor === Object || !(obj.constructor instanceof Function)) && | ||
!(Symbol.iterator in obj) && | ||
!(Symbol.asyncIterator in obj) | ||
); | ||
} | ||
@@ -74,0 +66,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51051
846
+ Added@rimbu/common@0.10.3(transitive)
- Removed@rimbu/common@0.9.4(transitive)
Updated@rimbu/common@^0.10.0