has-util

1.0.2 • Public • Published

has-util Build Status

Check if an object has a given key.

Inspired by _.has. 😄

Install

Install with npm

$ npm install has-util

Or unpkg

<script src="https://unpkg.com/has-util@1.0.0/umd/index.js" />

Check out the unit tests on CodePen.

Usage

const has = require('has-util');

has({a: 1, b: 2, c: 3}, 'b');
//=> true

Like us a lot? Help others know why you like us! Review this package on pkgreview.dev Review us on pkgreview.dev

API

has(object, key)

object

Type: objecct
Default: none

The objecct to look in.

key

Type: string
Default: none

The key to search for.

License

MIT

/has-util/

    Package Sidebar

    Install

    npm i has-util

    Weekly Downloads

    9

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    4.49 kB

    Total Files

    5

    Last publish

    Collaborators

    • jonkemp