Gogs df670eaa27 first commit il y a 3 semaines
..
.github df670eaa27 first commit il y a 3 semaines
.eslintrc df670eaa27 first commit il y a 3 semaines
.nycrc df670eaa27 first commit il y a 3 semaines
CHANGELOG.md df670eaa27 first commit il y a 3 semaines
LICENSE df670eaa27 first commit il y a 3 semaines
README.md df670eaa27 first commit il y a 3 semaines
index.d.ts df670eaa27 first commit il y a 3 semaines
index.js df670eaa27 first commit il y a 3 semaines
package.json df670eaa27 first commit il y a 3 semaines
tsconfig.json df670eaa27 first commit il y a 3 semaines

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