FrontPastel/node_modules/hasown
NataliaCancinoV aa2823eee5 Primer commit 2024-04-17 07:55:11 -06:00
..
.github Primer commit 2024-04-17 07:55:11 -06:00
.eslintrc Primer commit 2024-04-17 07:55:11 -06:00
.nycrc Primer commit 2024-04-17 07:55:11 -06:00
CHANGELOG.md Primer commit 2024-04-17 07:55:11 -06:00
LICENSE Primer commit 2024-04-17 07:55:11 -06:00
README.md Primer commit 2024-04-17 07:55:11 -06:00
index.d.ts Primer commit 2024-04-17 07:55:11 -06:00
index.js Primer commit 2024-04-17 07:55:11 -06:00
package.json Primer commit 2024-04-17 07:55:11 -06:00
tsconfig.json Primer commit 2024-04-17 07:55:11 -06:00

README.md

hasown Version Badge

github actions coverage License Downloads

npm badge

A robust, ES3 compatible, "has own property" predicate.

Example

const assert = require('assert');
const hasOwn = require('hasown');

assert.equal(hasOwn({}, 'toString'), false);
assert.equal(hasOwn([], 'length'), true);
assert.equal(hasOwn({ a: 42 }, 'a'), true);

Tests

Simply clone the repo, npm install, and run npm test