hasown
A robust, ES3 compatible, "has own property" predicate.
Last updated 8 months ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install hasown 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.0.1                                ...           latest (8 months ago)

3 Versions

  • 2.0.1                                ...           8 months ago
  • 2.0.0                                ...           a year ago
  • 1.0.1                                ...           10 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (15)

Copyright 2013 - present © cnpmjs.org | Home |