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

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i has-own-properties

    Weekly Downloads

    0

    Version

    1.0.16

    License

    MIT

    Last publish

    Collaborators

    • eirikbirkeland