186 GB
47,027 files
Updated 3 months ago
Name
Size
.github
.nycrc216 Bytes
xet
CHANGELOG.md3.66 kB
xet
LICENSE1.08 kB
xet
README.md1.61 kB
xet
eslint.config.mjs136 Bytes
xet
index.d.ts198 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
186 GB
Files
47,027
Last updated
May 1
Pre-warmed CDN
US EU US EU

Contributors