node-ejs-renderer/node_modules/hasown
2024-06-09 13:55:01 -04:00
..
.github Main initial commit 2024-06-09 13:55:01 -04:00
.eslintrc Main initial commit 2024-06-09 13:55:01 -04:00
.nycrc Main initial commit 2024-06-09 13:55:01 -04:00
CHANGELOG.md Main initial commit 2024-06-09 13:55:01 -04:00
index.d.ts Main initial commit 2024-06-09 13:55:01 -04:00
index.js Main initial commit 2024-06-09 13:55:01 -04:00
LICENSE Main initial commit 2024-06-09 13:55:01 -04:00
package.json Main initial commit 2024-06-09 13:55:01 -04:00
README.md Main initial commit 2024-06-09 13:55:01 -04:00
tsconfig.json Main initial commit 2024-06-09 13:55:01 -04: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