Socket
Socket
Sign inDemoInstall

@rimbu/base

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rimbu/base - npm Package Compare versions

Comparing version 0.9.1 to 0.9.2

16

dist/main/plain-object.js

@@ -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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc