abstract001 c82da41a8c 'first' 1 rok temu
..
.github c82da41a8c 'first' 1 rok temu
.eslintrc c82da41a8c 'first' 1 rok temu
.nycrc c82da41a8c 'first' 1 rok temu
CHANGELOG.md c82da41a8c 'first' 1 rok temu
LICENSE c82da41a8c 'first' 1 rok temu
README.md c82da41a8c 'first' 1 rok temu
index.d.ts c82da41a8c 'first' 1 rok temu
index.d.ts.map c82da41a8c 'first' 1 rok temu
index.js c82da41a8c 'first' 1 rok temu
package.json c82da41a8c 'first' 1 rok temu
tsconfig.json c82da41a8c 'first' 1 rok temu

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