Дамир Газизов 50745011d6 доделаны некоторые странички | 4 bulan lalu | |
---|---|---|
.. | ||
.github | 4 bulan lalu | |
.eslintrc | 4 bulan lalu | |
.nycrc | 4 bulan lalu | |
CHANGELOG.md | 4 bulan lalu | |
LICENSE | 4 bulan lalu | |
README.md | 4 bulan lalu | |
index.d.ts | 4 bulan lalu | |
index.js | 4 bulan lalu | |
package.json | 4 bulan lalu | |
tsconfig.json | 4 bulan lalu |
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