潘超林 79770928d5 init: 初始化项目 vor 2 Wochen
..
.github 79770928d5 init: 初始化项目 vor 2 Wochen
.eslintrc 79770928d5 init: 初始化项目 vor 2 Wochen
.nycrc 79770928d5 init: 初始化项目 vor 2 Wochen
CHANGELOG.md 79770928d5 init: 初始化项目 vor 2 Wochen
LICENSE 79770928d5 init: 初始化项目 vor 2 Wochen
README.md 79770928d5 init: 初始化项目 vor 2 Wochen
index.d.ts 79770928d5 init: 初始化项目 vor 2 Wochen
index.js 79770928d5 init: 初始化项目 vor 2 Wochen
package.json 79770928d5 init: 初始化项目 vor 2 Wochen
tsconfig.json 79770928d5 init: 初始化项目 vor 2 Wochen

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