has-own-properties

1.0.16 • Public • Published

Extends Object with .hasOwnProperties – an array version of .hasOwnProperty.

Returns boolean true if every specified property is found.

Usage:

const dog = {tail: 1, fur: 1}

console.log(
    dog.hasOwnProperties(['tail', 'fur'])
)
// true

Alternative(s) to using this library:

const dog = {tail: 1, fur: 1}

console.log(
    ['tail', 'fur'].every(ele=>dog.hasOwnProperty(ele))
)
// true

JavaScript Style Guide

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.16
    0
    • latest

Version History

Package Sidebar

Install

npm i has-own-properties

Weekly Downloads

0

Version

1.0.16

License

MIT

Last publish

Collaborators

  • eirikbirkeland