live-server/node_modules/hasown
2023-12-05 17:03:01 +00:00
..
.github test 2023-12-05 17:03:01 +00:00
.eslintrc test 2023-12-05 17:03:01 +00:00
.nycrc test 2023-12-05 17:03:01 +00:00
CHANGELOG.md test 2023-12-05 17:03:01 +00:00
index.d.ts test 2023-12-05 17:03:01 +00:00
index.d.ts.map test 2023-12-05 17:03:01 +00:00
index.js test 2023-12-05 17:03:01 +00:00
LICENSE test 2023-12-05 17:03:01 +00:00
package.json test 2023-12-05 17:03:01 +00:00
README.md test 2023-12-05 17:03:01 +00:00
tsconfig.json test 2023-12-05 17:03:01 +00: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