Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@thi.ng/checks

Package Overview
Dependencies
Maintainers
1
Versions
166
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 1.3.1 to 1.3.2

11

CHANGELOG.md

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

<a name="1.3.2"></a>
## [1.3.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.3.1...@thi.ng/checks@1.3.2) (2018-04-04)
### Bug Fixes
* **checks:** add prototype check for isPlainObject(), add tests ([bffc443](https://github.com/thi-ng/umbrella/commit/bffc443))
<a name="1.3.1"></a>

@@ -8,0 +19,0 @@ ## [1.3.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.3.0...@thi.ng/checks@1.3.1) (2018-04-01)

@@ -0,1 +1,7 @@

/**
* Similar to `isObject()`, but also checks if prototype is that of
* `Object` (or `null`).
*
* @param x
*/
export declare function isPlainObject(x: any): x is Object;

10

is-plain-object.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Similar to `isObject()`, but also checks if prototype is that of
* `Object` (or `null`).
*
* @param x
*/
function isPlainObject(x) {
return Object.prototype.toString.call(x) === "[object Object]";
let proto;
return Object.prototype.toString.call(x) === "[object Object]" &&
(proto = Object.getPrototypeOf(x), proto === null || proto === Object.getPrototypeOf({}));
}
exports.isPlainObject = isPlainObject;

2

package.json
{
"name": "@thi.ng/checks",
"version": "1.3.1",
"version": "1.3.2",
"description": "Single-function sub-modules for type, feature & value checks",

@@ -5,0 +5,0 @@ "main": "./index.js",

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