Velar/Backend/node_modules/hasown
2025-05-23 18:21:16 +05:30
..
.github Safe 2025-05-23 18:21:16 +05:30
.eslintrc Safe 2025-05-23 18:21:16 +05:30
.nycrc Safe 2025-05-23 18:21:16 +05:30
CHANGELOG.md Safe 2025-05-23 18:21:16 +05:30
index.d.ts Safe 2025-05-23 18:21:16 +05:30
index.js Safe 2025-05-23 18:21:16 +05:30
LICENSE Safe 2025-05-23 18:21:16 +05:30
package.json Safe 2025-05-23 18:21:16 +05:30
README.md Safe 2025-05-23 18:21:16 +05:30
tsconfig.json Safe 2025-05-23 18:21:16 +05:30

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