|
|
пре 1 година | |
|---|---|---|
| .. | ||
| .github | пре 1 година | |
| .eslintrc | пре 1 година | |
| .nycrc | пре 1 година | |
| CHANGELOG.md | пре 1 година | |
| LICENSE | пре 1 година | |
| README.md | пре 1 година | |
| index.d.ts | пре 1 година | |
| index.d.ts.map | пре 1 година | |
| index.js | пре 1 година | |
| package.json | пре 1 година | |
| tsconfig.json | пре 1 година | |
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