fullstackopen-notes/parts/3/phonebookBackend/node_modules/hasown
2025-05-31 22:51:30 +02:00
..
.github completed exercise 3.1 2025-05-31 22:51:30 +02:00
.eslintrc completed exercise 3.1 2025-05-31 22:51:30 +02:00
.nycrc completed exercise 3.1 2025-05-31 22:51:30 +02:00
CHANGELOG.md completed exercise 3.1 2025-05-31 22:51:30 +02:00
index.d.ts completed exercise 3.1 2025-05-31 22:51:30 +02:00
index.js completed exercise 3.1 2025-05-31 22:51:30 +02:00
LICENSE completed exercise 3.1 2025-05-31 22:51:30 +02:00
package.json completed exercise 3.1 2025-05-31 22:51:30 +02:00
README.md completed exercise 3.1 2025-05-31 22:51:30 +02:00
tsconfig.json completed exercise 3.1 2025-05-31 22:51:30 +02: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