@yavisht/has-key

1.1.0 • Public • Published

Release GitHub release (latest SemVer) semantic-release

HasKey - Does the object have the key?

A simple util that will return true or false if the specified key is present in the object supplied.

What's New?

  • Package now available on NPM and Github Package Registry

Installation

// NPM
npm i @yavisht/has-key 

// Yarn
yarn add @yavisht/has-key

Usage

// require example
const hasKey = require('@yavisht/has-key')

// import example 
import hasKey from '@yavisht/has-key'

// returns true
console.log(hasKey({foo:'bar'}, 'foo'))

// returns false
console.log(hasKey({foo:'bar'}, 'bar'))

Readme

Keywords

none

Package Sidebar

Install

npm i @yavisht/has-key

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

3.72 kB

Total Files

5

Last publish

Collaborators

  • yavisht