cmux/node_modules/hasown
2026-01-29 17:36:26 -08:00
..
.github Update app and tooling 2026-01-29 17:36:26 -08:00
.eslintrc Update app and tooling 2026-01-29 17:36:26 -08:00
.nycrc Update app and tooling 2026-01-29 17:36:26 -08:00
CHANGELOG.md Update app and tooling 2026-01-29 17:36:26 -08:00
index.d.ts Update app and tooling 2026-01-29 17:36:26 -08:00
index.js Update app and tooling 2026-01-29 17:36:26 -08:00
LICENSE Update app and tooling 2026-01-29 17:36:26 -08:00
package.json Update app and tooling 2026-01-29 17:36:26 -08:00
README.md Update app and tooling 2026-01-29 17:36:26 -08:00
tsconfig.json Update app and tooling 2026-01-29 17:36:26 -08: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