Gogs df670eaa27 first commit vor 3 Wochen
..
.github df670eaa27 first commit vor 3 Wochen
.eslintrc df670eaa27 first commit vor 3 Wochen
.nycrc df670eaa27 first commit vor 3 Wochen
CHANGELOG.md df670eaa27 first commit vor 3 Wochen
LICENSE df670eaa27 first commit vor 3 Wochen
README.md df670eaa27 first commit vor 3 Wochen
index.d.ts df670eaa27 first commit vor 3 Wochen
index.js df670eaa27 first commit vor 3 Wochen
package.json df670eaa27 first commit vor 3 Wochen
tsconfig.json df670eaa27 first commit vor 3 Wochen

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