|
|
il y a 4 mois | |
|---|---|---|
| .. | ||
| .github | il y a 4 mois | |
| .eslintrc | il y a 4 mois | |
| .nycrc | il y a 4 mois | |
| CHANGELOG.md | il y a 4 mois | |
| LICENSE | il y a 4 mois | |
| README.md | il y a 4 mois | |
| index.d.ts | il y a 4 mois | |
| index.js | il y a 4 mois | |
| package.json | il y a 4 mois | |
| tsconfig.json | il y a 4 mois | |
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