Buckets:
215 MB
4,079 files
Updated 2 days ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| .github | 1 items | ||
| .nycrc | 216 Bytes xet | 4448e85a | |
| CHANGELOG.md | 4.08 kB xet | e75669ee | |
| LICENSE | 1.08 kB xet | d2a824a6 | |
| README.md | 1.61 kB xet | 617b2e42 | |
| eslint.config.mjs | 136 Bytes xet | 1229d19c | |
| index.d.ts | 117 Bytes xet | d1d703e3 | |
| index.js | 206 Bytes xet | 128c25af | |
| package.json | 2.26 kB xet | 9e9a6398 | |
| tsconfig.json | 73 Bytes xet | 5ad89830 |
hasown
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
- 215 MB
- Files
- 4,079
- Last updated
- Aug 7
- Pre-warmed CDN
- US EU US EU
