is-obj-prop
v2.0.0
Published
Does a JS type have a property
Downloads
781,472
Maintainers
Readme
is-obj-prop
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