lingjing/node_modules/hasown
2026-02-23 09:51:43 +00:00
..
.github feat: 灵镜H5验证版初始提交 2026-02-23 09:51:43 +00:00
.eslintrc feat: 灵镜H5验证版初始提交 2026-02-23 09:51:43 +00:00
.nycrc feat: 灵镜H5验证版初始提交 2026-02-23 09:51:43 +00:00
CHANGELOG.md feat: 灵镜H5验证版初始提交 2026-02-23 09:51:43 +00:00
index.d.ts feat: 灵镜H5验证版初始提交 2026-02-23 09:51:43 +00:00
index.js feat: 灵镜H5验证版初始提交 2026-02-23 09:51:43 +00:00
LICENSE feat: 灵镜H5验证版初始提交 2026-02-23 09:51:43 +00:00
package.json feat: 灵镜H5验证版初始提交 2026-02-23 09:51:43 +00:00
README.md feat: 灵镜H5验证版初始提交 2026-02-23 09:51:43 +00:00
tsconfig.json feat: 灵镜H5验证版初始提交 2026-02-23 09:51:43 +00:00

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