make f253a535c5 first commit пре 2 месеци
..
.github f253a535c5 first commit пре 2 месеци
.eslintrc f253a535c5 first commit пре 2 месеци
.nycrc f253a535c5 first commit пре 2 месеци
CHANGELOG.md f253a535c5 first commit пре 2 месеци
LICENSE f253a535c5 first commit пре 2 месеци
README.md f253a535c5 first commit пре 2 месеци
index.d.ts f253a535c5 first commit пре 2 месеци
index.js f253a535c5 first commit пре 2 месеци
package.json f253a535c5 first commit пре 2 месеци
tsconfig.json f253a535c5 first commit пре 2 месеци

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