is-obj-prop

2.0.0 • Public • Published

is-obj-prop

NPM version Coverage Status Code Climate

Does a JS type have a property

Install

npm install --save is-obj-prop

Usage

ES2015

import isObjProp from 'is-obj-prop';

isObjProp('array', 'length');
// => true

isObjProp('ARRAY', 'push');
// => false

// is-obj-prop can only verify native JS types
isObjProp('gulp', 'task');
// => false;

API

isObjProp(type, propertyName)

type

Type: string

A native JS type to examine. Note: is-obj-prop can only verify native JS types.

propertyName

Type: string

Property name to determine if a property of type.

LICENSE

MIT © Dustin Specker

Package Sidebar

Install

npm i is-obj-prop

Weekly Downloads

194,668

Version

2.0.0

License

MIT

Unpacked Size

3.6 kB

Total Files

4

Last publish

Collaborators

  • dustinspecker