dach/node_modules/hasown
leca 30228b54ae a lot of changes 2023-10-22 22:39:45 +03:00
..
.github a lot of changes 2023-10-22 22:39:45 +03:00
.eslintrc a lot of changes 2023-10-22 22:39:45 +03:00
.nycrc a lot of changes 2023-10-22 22:39:45 +03:00
CHANGELOG.md a lot of changes 2023-10-22 22:39:45 +03:00
LICENSE a lot of changes 2023-10-22 22:39:45 +03:00
README.md a lot of changes 2023-10-22 22:39:45 +03:00
index.d.ts a lot of changes 2023-10-22 22:39:45 +03:00
index.d.ts.map a lot of changes 2023-10-22 22:39:45 +03:00
index.js a lot of changes 2023-10-22 22:39:45 +03:00
package.json a lot of changes 2023-10-22 22:39:45 +03:00
tsconfig.json a lot of changes 2023-10-22 22:39:45 +03:00

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