[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A robust, ES3 compatible, "has own property" predicate.

License

Notifications You must be signed in to change notification settings

inspect-js/hasOwn

Repository files navigation

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

About

A robust, ES3 compatible, "has own property" predicate.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks