🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

has-util

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

has-util

Check if an object has a given key.

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
11
-50%
Maintainers
1
Weekly downloads
 
Created
Source

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.devReview 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

Keywords

object

FAQs

Package last updated on 22 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts