Muqriz 48f16bfc3e initail first | 4 months ago | |
---|---|---|
.. | ||
.github | 4 months ago | |
.eslintrc | 4 months ago | |
.nycrc | 4 months ago | |
CHANGELOG.md | 4 months ago | |
LICENSE | 4 months ago | |
README.md | 4 months ago | |
index.d.ts | 4 months ago | |
index.js | 4 months ago | |
package.json | 4 months ago | |
tsconfig.json | 4 months ago |
A robust, ES3 compatible, “has own property” predicate.
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);
Simply clone the repo, npm install
, and run npm test