is-proto-prop
Does a JS type's prototype have a property
Last updated 2 years ago by dustinspecker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install is-proto-prop 
SYNC missed versions from official npm registry.

is-proto-prop

NPM version Coverage Status

Code Climate

Does a JS type's prototype have a property

Install

npm install --save is-proto-prop

Usage

ES2015

import isProtoProp from 'is-proto-prop';

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

isProtoProp('Error', 'ignore');
// => false

// `is-proto-props` can only verify native JS types
isProtoProp('gulp', 'task');
// => false

API

isProtoProp(type, propertyName)

Returns a Boolean if propertyName is on type's prototype.

type

type: string

JS type to examine the prototype of. Note: is-proto-prop only looks at native JS types.

propertyName

type: string

Property name to look for on type's prototype. Note: propertyName is case sensitive.

LICENSE

MIT © Dustin Specker

Current Tags

  • 3.0.1                                ...           latest (2 years ago)

5 Versions

  • 3.0.1                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.0.0                                ...           7 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 4
Last Day 0
Last Week 4
Last Month 1
Dependencies (2)
Dev Dependencies (5)

Copyright 2013 - present © cnpmjs.org | Home |