has-util
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 | ➡ |
---|
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