codeql-action/node_modules/hasown
github-actions[bot] 9c3b394d7f Update checked-in dependencies 2023-10-23 18:03:04 +00:00
..
.github Update checked-in dependencies 2023-10-23 18:03:04 +00:00
.eslintrc Update checked-in dependencies 2023-10-23 18:03:04 +00:00
.nycrc Update checked-in dependencies 2023-10-23 18:03:04 +00:00
CHANGELOG.md Update checked-in dependencies 2023-10-23 18:03:04 +00:00
LICENSE Update checked-in dependencies 2023-10-23 18:03:04 +00:00
README.md Update checked-in dependencies 2023-10-23 18:03:04 +00:00
index.d.ts Update checked-in dependencies 2023-10-23 18:03:04 +00:00
index.d.ts.map Update checked-in dependencies 2023-10-23 18:03:04 +00:00
index.js Update checked-in dependencies 2023-10-23 18:03:04 +00:00
package.json Update checked-in dependencies 2023-10-23 18:03:04 +00:00
tsconfig.json Update checked-in dependencies 2023-10-23 18:03:04 +00: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