zheng f326829555 仓库 пре 1 недеља
..
.github f326829555 仓库 пре 1 недеља
.nycrc f326829555 仓库 пре 1 недеља
CHANGELOG.md f326829555 仓库 пре 1 недеља
LICENSE f326829555 仓库 пре 1 недеља
README.md f326829555 仓库 пре 1 недеља
eslint.config.mjs f326829555 仓库 пре 1 недеља
index.d.ts f326829555 仓库 пре 1 недеља
index.js f326829555 仓库 пре 1 недеља
package.json f326829555 仓库 пре 1 недеља
tsconfig.json f326829555 仓库 пре 1 недеља

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