|
|
1 rok temu | |
|---|---|---|
| .. | ||
| .github | 1 rok temu | |
| .eslintrc | 1 rok temu | |
| .nycrc | 1 rok temu | |
| CHANGELOG.md | 1 rok temu | |
| LICENSE | 1 rok temu | |
| README.md | 1 rok temu | |
| index.d.ts | 1 rok temu | |
| index.d.ts.map | 1 rok temu | |
| index.js | 1 rok temu | |
| package.json | 1 rok temu | |
| tsconfig.json | 1 rok temu | |
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