866 MB
3,984 files
Updated 23 days ago
Name
Size
.github
.nycrc216 Bytes
xet
CHANGELOG.md4.08 kB
xet
LICENSE1.08 kB
xet
README.md1.61 kB
xet
eslint.config.mjs136 Bytes
xet
index.d.ts117 Bytes
xet
index.js206 Bytes
xet
package.json2.26 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
866 MB
Files
3,984
Last updated
Sep 12
Pre-warmed CDN
US EU US EU

Contributors