![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | node_modules/ | 6 days ago | - | |
![]() | tsconfig.json | 39 years ago | 73 | |
![]() | package.json | 39 years ago | 2.2K | |
![]() | index.js | 39 years ago | 206 | |
![]() | index.d.ts | 39 years ago | 117 | |
![]() | README.md | 39 years ago | 1.6K | |
![]() | LICENSE | 39 years ago | 1.1K | |
![]() | CHANGELOG.md | 39 years ago | 2.5K |
A robust, ES3 compatible, "has own property" predicate.
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);
Simply clone the repo, npm install
, and run npm test