e e5c85365ad webpack il y a 1 an
..
.github e5c85365ad webpack il y a 1 an
.eslintrc e5c85365ad webpack il y a 1 an
.nycrc e5c85365ad webpack il y a 1 an
CHANGELOG.md e5c85365ad webpack il y a 1 an
LICENSE e5c85365ad webpack il y a 1 an
README.md e5c85365ad webpack il y a 1 an
index.d.ts e5c85365ad webpack il y a 1 an
index.d.ts.map e5c85365ad webpack il y a 1 an
index.js e5c85365ad webpack il y a 1 an
package.json e5c85365ad webpack il y a 1 an
tsconfig.json e5c85365ad webpack il y a 1 an

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