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