leaflet / map / web / node_modules / hasown /
@[abemizuki] [abemizuki] authored on 8 Aug
..
.github add 1 month ago
.eslintrc add 1 month ago
.nycrc add 1 month ago
CHANGELOG.md add 1 month ago
LICENSE add 1 month ago
README.md add 1 month ago
index.d.ts add 1 month ago
index.js add 1 month ago
package.json add 1 month ago
tsconfig.json add 1 month ago
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