904118851 80e7af0830 123 2 nedēļas atpakaļ
..
.github 80e7af0830 123 2 nedēļas atpakaļ
.eslintrc 80e7af0830 123 2 nedēļas atpakaļ
.nycrc 80e7af0830 123 2 nedēļas atpakaļ
CHANGELOG.md 80e7af0830 123 2 nedēļas atpakaļ
LICENSE 80e7af0830 123 2 nedēļas atpakaļ
README.md 80e7af0830 123 2 nedēļas atpakaļ
index.d.ts 80e7af0830 123 2 nedēļas atpakaļ
index.js 80e7af0830 123 2 nedēļas atpakaļ
package.json 80e7af0830 123 2 nedēļas atpakaļ
tsconfig.json 80e7af0830 123 2 nedēļas atpakaļ

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