urltomarkdown/node_modules/hasown
Lee Hanken d40eb12fa6 include generated API docs 2024-04-22 13:29:49 +01:00
..
.github include generated API docs 2024-04-22 13:29:49 +01:00
.eslintrc include generated API docs 2024-04-22 13:29:49 +01:00
.nycrc include generated API docs 2024-04-22 13:29:49 +01:00
CHANGELOG.md include generated API docs 2024-04-22 13:29:49 +01:00
LICENSE include generated API docs 2024-04-22 13:29:49 +01:00
README.md include generated API docs 2024-04-22 13:29:49 +01:00
index.d.ts include generated API docs 2024-04-22 13:29:49 +01:00
index.js include generated API docs 2024-04-22 13:29:49 +01:00
package.json include generated API docs 2024-04-22 13:29:49 +01:00
tsconfig.json include generated API docs 2024-04-22 13:29:49 +01:00

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