Buckets:
1.39 GB
20,046 files
Updated 15 days ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| .github | 1 items | ||
| .eslintrc | 43 Bytes xet | c9eddeea | |
| .nycrc | 216 Bytes xet | 4448e85a | |
| CHANGELOG.md | 2.58 kB xet | a7f76db8 | |
| LICENSE | 1.08 kB xet | d2a824a6 | |
| README.md | 1.61 kB xet | 617b2e42 | |
| index.d.ts | 117 Bytes xet | d1d703e3 | |
| index.js | 206 Bytes xet | 128c25af | |
| package.json | 2.28 kB xet | 2480a8d9 | |
| 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
- 1.39 GB
- Files
- 20,046
- Last updated
- May 9
- Pre-warmed CDN
- US EU US EU
