1.39 GB
20,046 files
Updated 15 days ago
NameSize
.github
.eslintrc43 Bytes
xet
.nycrc216 Bytes
xet
CHANGELOG.md2.58 kB
xet
LICENSE1.08 kB
xet
README.md1.61 kB
xet
index.d.ts117 Bytes
xet
index.js206 Bytes
xet
package.json2.28 kB
xet
tsconfig.json73 Bytes
xet
README.md

hasown Version Badge

github actions coverage License Downloads

npm badge

A robust, ES3 compatible, "has own property" predicate.

Example

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);

Tests

Simply clone the repo, npm install, and run npm test

Total size
1.39 GB
Files
20,046
Last updated
May 9
Pre-warmed CDN
US EU US EU

Contributors