2.0.2 • Published 1 year ago

hasown v2.0.2

Weekly downloads
5,539
License
MIT
Repository
github
Last release
1 year ago

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

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

2 years ago

1.0.1

11 years ago