@pacote/is-plain-object
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -6,10 +6,10 @@ # Change Log | ||
## [2.0.2](https://github.com/PacoteJS/pacote/compare/@pacote/is-plain-object@2.0.1...@pacote/is-plain-object@2.0.2) (2023-08-25) | ||
## [2.0.3](https://github.com/PacoteJS/pacote/compare/@pacote/is-plain-object@2.0.2...@pacote/is-plain-object@2.0.3) (2024-10-05) | ||
**Note:** Version bump only for package @pacote/is-plain-object | ||
## [2.0.2](https://github.com/PacoteJS/pacote/compare/@pacote/is-plain-object@2.0.1...@pacote/is-plain-object@2.0.2) (2023-08-25) | ||
**Note:** Version bump only for package @pacote/is-plain-object | ||
## [2.0.1](https://github.com/PacoteJS/pacote/compare/@pacote/is-plain-object@2.0.0...@pacote/is-plain-object@2.0.1) (2023-04-22) | ||
@@ -16,0 +16,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isPlainObject = void 0; | ||
exports.isPlainObject = isPlainObject; | ||
function isPlainObject(o) { | ||
@@ -27,3 +27,2 @@ return (o != null && | ||
} | ||
exports.isPlainObject = isPlainObject; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@pacote/is-plain-object", | ||
"description": "Checks whether the provided object is a plain JavaScript object.", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"sideEffects": false, | ||
@@ -30,8 +30,8 @@ "license": "MIT", | ||
"scripts": { | ||
"build": "yarn build:esm && yarn build:cjs", | ||
"build": "pnpm build:esm && pnpm build:cjs", | ||
"build:cjs": "tsc -p ./tsconfig.cjs.json", | ||
"build:esm": "tsc -p ./tsconfig.esm.json", | ||
"prepublish": "yarn build" | ||
"prepublish": "pnpm build" | ||
}, | ||
"gitHead": "130affd281be18a42718fd9b47baa531a1146fb1" | ||
"gitHead": "4bbe789f078b3e6ee5d56870eaf46ca2e78b596f" | ||
} |
import { | ||
assert, | ||
anything, | ||
array, | ||
assert, | ||
float, | ||
@@ -11,2 +11,3 @@ func, | ||
} from 'fast-check' | ||
import { expect, test } from 'vitest' | ||
import { isPlainObject } from '../src' | ||
@@ -81,4 +82,3 @@ | ||
expect(isPlainObject(/a/)).toBe(false) | ||
// eslint-disable-next-line prefer-regex-literals | ||
expect(isPlainObject(RegExp(''))).toBe(false) | ||
expect(isPlainObject(/(?:)/)).toBe(false) | ||
}) | ||
@@ -90,4 +90,11 @@ | ||
test.each<[string, any]>([ | ||
['ArrayBuffer', ArrayBuffer], | ||
test('ArrayBuffer is not a plain object', () => { | ||
expect(isPlainObject(new ArrayBuffer(1))).toBe(false) | ||
}) | ||
interface Constructable<T> { | ||
new (): T | ||
} | ||
test.each<[string, Constructable<unknown>]>([ | ||
['Date', Date], | ||
@@ -94,0 +101,0 @@ ['Float32Array', Float32Array], |
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
12796
180
1