descriptors

1.0.4 • Public • Published

descriptors

Like Object.getOwnPropertyDescriptor, but goes along the prototype chain and gets the descriptors for all properties.

Build Status js-standard-style npm version Coverage Status

-- Usage

const descriptors = require('descriptors')
descriptors({ a: 'a', b: 'b' })
/*
  {
    a: {
      value: 'a',
      writable: true,
      enumerable: true,
      configurable: true
    },
    b: {
      value: 'a',
      writable: true,
      enumerable: true,
      configurable: true
    }
  }
*/

Package Sidebar

Install

npm i descriptors

Weekly Downloads

17

Version

1.0.4

License

ISC

Last publish

Collaborators

  • vigour-io