site/node_modules/hasown
2024-10-14 08:09:33 +02:00
..
.github updated shit 2024-10-14 08:09:33 +02:00
.eslintrc updated shit 2024-10-14 08:09:33 +02:00
.nycrc updated shit 2024-10-14 08:09:33 +02:00
CHANGELOG.md updated shit 2024-10-14 08:09:33 +02:00
index.d.ts updated shit 2024-10-14 08:09:33 +02:00
index.d.ts.map updated shit 2024-10-14 08:09:33 +02:00
index.js updated shit 2024-10-14 08:09:33 +02:00
LICENSE updated shit 2024-10-14 08:09:33 +02:00
package.json updated shit 2024-10-14 08:09:33 +02:00
README.md updated shit 2024-10-14 08:09:33 +02:00
tsconfig.json updated shit 2024-10-14 08:09:33 +02:00

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