Socket
Socket
Sign inDemoInstall

@thi.ng/checks

Package Overview
Dependencies
Maintainers
1
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/checks - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

AUTHORS.md

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [2.1.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.1.1...@thi.ng/checks@2.1.2) (2019-03-12)
### Bug Fixes
* **checks:** fix [#77](https://github.com/thi-ng/umbrella/issues/77), update & minor optimization isPlainObject() ([47ac88a](https://github.com/thi-ng/umbrella/commit/47ac88a))
## [2.1.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.1.0...@thi.ng/checks@2.1.1) (2019-03-01)

@@ -8,0 +19,0 @@

9

is-plain-object.js

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

const OBJP = Object.getPrototypeOf({});
const OBJP = Object.getPrototypeOf;
/**

@@ -9,5 +9,6 @@ * Similar to `isObject()`, but also checks if prototype is that of

export const isPlainObject = (x) => {
let proto;
return (Object.prototype.toString.call(x) === "[object Object]" &&
((proto = Object.getPrototypeOf(x)), proto === null || proto === OBJP));
let p;
return (x != null &&
typeof x === "object" &&
((p = OBJP(x)) === null || OBJP(p) === null));
};

@@ -101,7 +101,8 @@ 'use strict';

const OBJP = Object.getPrototypeOf({});
const OBJP = Object.getPrototypeOf;
const isPlainObject = (x) => {
let proto;
return (Object.prototype.toString.call(x) === "[object Object]" &&
((proto = Object.getPrototypeOf(x)), proto === null || proto === OBJP));
let p;
return (x != null &&
typeof x === "object" &&
((p = OBJP(x)) === null || OBJP(p) === null));
};

@@ -108,0 +109,0 @@

@@ -103,7 +103,8 @@ (function (global, factory) {

const OBJP = Object.getPrototypeOf({});
const OBJP = Object.getPrototypeOf;
const isPlainObject = (x) => {
let proto;
return (Object.prototype.toString.call(x) === "[object Object]" &&
((proto = Object.getPrototypeOf(x)), proto === null || proto === OBJP));
let p;
return (x != null &&
typeof x === "object" &&
((p = OBJP(x)) === null || OBJP(p) === null));
};

@@ -110,0 +111,0 @@

{
"name": "@thi.ng/checks",
"version": "2.1.1",
"version": "2.1.2",
"description": "Single-function sub-modules for type, feature & value checks",

@@ -55,3 +55,3 @@ "module": "./index.js",

"sideEffects": false,
"gitHead": "e43f57c7554fd78380bba58d37ae62ca01221eeb"
"gitHead": "05e82adc716d6b422fbfac861723fac5babeeb83"
}

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc