zyh f2307604ee z vor 8 Monaten
..
.github f2307604ee z vor 8 Monaten
.eslintrc f2307604ee z vor 8 Monaten
.nycrc f2307604ee z vor 8 Monaten
CHANGELOG.md f2307604ee z vor 8 Monaten
LICENSE f2307604ee z vor 8 Monaten
README.md f2307604ee z vor 8 Monaten
index.d.ts f2307604ee z vor 8 Monaten
index.js f2307604ee z vor 8 Monaten
package.json f2307604ee z vor 8 Monaten
tsconfig.json f2307604ee z vor 8 Monaten

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