LookAtMySuitBot/js/node_modules/hasown
Brett 5f2b208d42 c++ setup 2023-12-24 20:08:39 -05:00
..
.github c++ setup 2023-12-24 20:08:39 -05:00
.eslintrc c++ setup 2023-12-24 20:08:39 -05:00
.nycrc c++ setup 2023-12-24 20:08:39 -05:00
CHANGELOG.md c++ setup 2023-12-24 20:08:39 -05:00
LICENSE c++ setup 2023-12-24 20:08:39 -05:00
README.md c++ setup 2023-12-24 20:08:39 -05:00
index.d.ts c++ setup 2023-12-24 20:08:39 -05:00
index.d.ts.map c++ setup 2023-12-24 20:08:39 -05:00
index.js c++ setup 2023-12-24 20:08:39 -05:00
package.json c++ setup 2023-12-24 20:08:39 -05:00
tsconfig.json c++ setup 2023-12-24 20:08:39 -05: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