New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

get-own-property-descriptors-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-own-property-descriptors-polyfill

A polyfill for Object.getOwnPropertyDescriptors

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
decreased by-10.02%
Maintainers
1
Weekly downloads
 
Created
Source

get-own-property-descriptors-polyfill

A polyfill for Object.getOwnPropertyDescriptors which wasn't included in Node.js until v7.0.0.

npm build status js-standard-style

Installation

npm install get-own-property-descriptors-polyfill --save

Usage

const assert = require('assert')
const getOwnPropertyDescriptors = require('get-own-property-descriptors-polyfill')

function getter () { return 'hello' }

const obj = Object.defineProperties({}, {
  foo: { value: 42, enumerable: false },
  bar: { get: getter }
})

const descriptors = getOwnPropertyDescriptors(obj)

assert.deepStrictEqual(descriptors, {
  foo: { value: 42, writable: false, enumerable: false, configurable: false },
  bar: { get: getter, set: undefined, enumerable: false, configurable: false }
})

License

MIT

Keywords

FAQs

Package last updated on 31 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc