has-own

A safer .hasOwnProperty() - hasOwn(name, obj)

This project is not maintained. Use Object.hasOwn() instead.
Last updated 7 years ago by aaron .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install has-own 
SYNC missed versions from official npm registry.

#has-own

Build Status

Shorthand Object.prototype.hasOwnProperty.call(obj, name).

var assert = require('assert');
var hasOwn = require('has-own');

var o = Object.create(null);
o.name = 'has-own';

assert(hasOwn('name', o)); // true

Why another module? Because I like its readability.

LICENSE

Current Tags

  • 1.0.1                                ...           latest (7 years ago)

2 Versions

  • 1.0.1 [deprecated]           ...           7 years ago
  • 1.0.0 [deprecated]           ...           12 years ago
Maintainers (2)
Downloads
Total 3
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE