Dirk Alders 97486731b5 Dashboard 2 - EG-West | 4 maanden geleden | |
---|---|---|
.. | ||
.github | 4 maanden geleden | |
.eslintrc | 4 maanden geleden | |
.nycrc | 4 maanden geleden | |
CHANGELOG.md | 4 maanden geleden | |
LICENSE | 4 maanden geleden | |
README.md | 4 maanden geleden | |
index.d.ts | 4 maanden geleden | |
index.js | 4 maanden geleden | |
package.json | 4 maanden geleden | |
tsconfig.json | 4 maanden geleden |
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