Buckets:
186 GB
47,027 files
Updated 3 months ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| .github | 1 items | ||
| .nycrc | 216 Bytes xet | 4448e85a | |
| CHANGELOG.md | 3.66 kB xet | 9e17a2f4 | |
| LICENSE | 1.08 kB xet | d2a824a6 | |
| README.md | 1.61 kB xet | 617b2e42 | |
| eslint.config.mjs | 136 Bytes xet | 1229d19c | |
| index.d.ts | 198 Bytes xet | a9ad0246 | |
| index.js | 206 Bytes xet | 128c25af | |
| package.json | 2.28 kB xet | 42d38ced | |
| 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
- 186 GB
- Files
- 47,027
- Last updated
- May 1
- Pre-warmed CDN
- US EU US EU
