Ryuiso b1774d2c86 no message 1 gadu atpakaļ
..
.github b1774d2c86 no message 1 gadu atpakaļ
.eslintrc b1774d2c86 no message 1 gadu atpakaļ
.nycrc b1774d2c86 no message 1 gadu atpakaļ
CHANGELOG.md b1774d2c86 no message 1 gadu atpakaļ
LICENSE b1774d2c86 no message 1 gadu atpakaļ
README.md b1774d2c86 no message 1 gadu atpakaļ
index.d.ts b1774d2c86 no message 1 gadu atpakaļ
index.d.ts.map b1774d2c86 no message 1 gadu atpakaļ
index.js b1774d2c86 no message 1 gadu atpakaļ
package.json b1774d2c86 no message 1 gadu atpakaļ
tsconfig.json b1774d2c86 no message 1 gadu atpakaļ

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