max_liu b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
..
.github b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
.eslintrc b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
.nycrc b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
CHANGELOG.md b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
LICENSE b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
README.md b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
index.d.ts b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
index.js b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
package.json b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
tsconfig.json b7ab7c8514 chore: 更新node_modules依赖文件 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