django-cotton/docs/docs_project/node_modules/hasown
2024-06-08 14:33:11 +01:00
..
.github first release 2024-06-08 14:33:11 +01:00
.eslintrc first release 2024-06-08 14:33:11 +01:00
.nycrc first release 2024-06-08 14:33:11 +01:00
CHANGELOG.md first release 2024-06-08 14:33:11 +01:00
index.d.ts first release 2024-06-08 14:33:11 +01:00
index.d.ts.map first release 2024-06-08 14:33:11 +01:00
index.js first release 2024-06-08 14:33:11 +01:00
LICENSE first release 2024-06-08 14:33:11 +01:00
package.json first release 2024-06-08 14:33:11 +01:00
README.md first release 2024-06-08 14:33:11 +01:00
tsconfig.json first release 2024-06-08 14:33:11 +01: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