1.0.1 • Published 6 years ago

@kingjs/is-enumerable v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

@kingjs/is-enumerable

Returns true if own or inherited property is enumerable.

Usage

Test if an inherited override of toString is enumerable like this:

var isEnumerable = require('@kingjs/is-enumerable');

isEnumerable.call(Object.create({ toString: null }), 'toString');

result:

true

API

declare function isEnumerable(
  this,
  name: string
): boolean

Parameters

  • this: The object to test for an enumerable property.
  • name: The property name to test.

Returns

Returns true if the own or inherited property name exists and is enumerable, otherwise false.

Install

With npm installed, run

$ npm install @kingjs/is-enumerable

License

MIT

Analytics