rss2/frontend/node_modules/hasown
2026-03-28 18:30:07 +01:00
..
.github go integration and wikipedia 2026-03-28 18:30:07 +01:00
.eslintrc go integration and wikipedia 2026-03-28 18:30:07 +01:00
.nycrc go integration and wikipedia 2026-03-28 18:30:07 +01:00
CHANGELOG.md go integration and wikipedia 2026-03-28 18:30:07 +01:00
index.d.ts go integration and wikipedia 2026-03-28 18:30:07 +01:00
index.js go integration and wikipedia 2026-03-28 18:30:07 +01:00
LICENSE go integration and wikipedia 2026-03-28 18:30:07 +01:00
package.json go integration and wikipedia 2026-03-28 18:30:07 +01:00
README.md go integration and wikipedia 2026-03-28 18:30:07 +01:00
tsconfig.json go integration and wikipedia 2026-03-28 18:30:07 +01: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