ITRIMOBE_API/node_modules/hasown
2025-08-02 04:10:14 +03:00
..
.github init project API 2025-08-02 04:10:14 +03:00
.eslintrc init project API 2025-08-02 04:10:14 +03:00
.nycrc init project API 2025-08-02 04:10:14 +03:00
CHANGELOG.md init project API 2025-08-02 04:10:14 +03:00
index.d.ts init project API 2025-08-02 04:10:14 +03:00
index.js init project API 2025-08-02 04:10:14 +03:00
LICENSE init project API 2025-08-02 04:10:14 +03:00
package.json init project API 2025-08-02 04:10:14 +03:00
README.md init project API 2025-08-02 04:10:14 +03:00
tsconfig.json init project API 2025-08-02 04:10:14 +03: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