PortablePosPrinterHamekara/node_modules/hasown
mehranz c2686e7110 initial commit 2025-11-15 13:33:50 +03:30
..
.github initial commit 2025-11-15 13:33:50 +03:30
.eslintrc initial commit 2025-11-15 13:33:50 +03:30
.nycrc initial commit 2025-11-15 13:33:50 +03:30
CHANGELOG.md initial commit 2025-11-15 13:33:50 +03:30
LICENSE initial commit 2025-11-15 13:33:50 +03:30
README.md initial commit 2025-11-15 13:33:50 +03:30
index.d.ts initial commit 2025-11-15 13:33:50 +03:30
index.js initial commit 2025-11-15 13:33:50 +03:30
package.json initial commit 2025-11-15 13:33:50 +03:30
tsconfig.json initial commit 2025-11-15 13:33:50 +03:30

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