agibalov d1106a4bc7 1 4 dni temu
..
.github d1106a4bc7 1 4 dni temu
.eslintrc d1106a4bc7 1 4 dni temu
.nycrc d1106a4bc7 1 4 dni temu
CHANGELOG.md d1106a4bc7 1 4 dni temu
LICENSE d1106a4bc7 1 4 dni temu
README.md d1106a4bc7 1 4 dni temu
index.d.ts d1106a4bc7 1 4 dni temu
index.js d1106a4bc7 1 4 dni temu
package.json d1106a4bc7 1 4 dni temu
tsconfig.json d1106a4bc7 1 4 dni 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