Socket
Socket
Sign inDemoInstall

babel-plugin-prototype-prop-define

Package Overview
Dependencies
1
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 2.0.2

5

package.json
{
"name": "babel-plugin-prototype-prop-define",
"version": "2.0.1",
"version": "2.0.2",
"description": "Transform assignments to properties on built-in prototypes to Object.defineProperty calls",

@@ -42,5 +42,2 @@ "main": "src/index.js",

],
"babel": {
"presets": "kcd-scripts/babel"
},
"repository": {

@@ -47,0 +44,0 @@ "type": "git",

@@ -23,4 +23,4 @@ import path from 'path'

const x = {}
x.a = () => true
const x = {}
x.a = () => true

@@ -52,2 +52,8 @@ `,

`,
'ignore alternate assigment expressions': `
const x = {}
x.toString += 1
`,
// 'key as string': `

@@ -54,0 +60,0 @@

2

src/index.js

@@ -78,2 +78,4 @@ const primordialKeySet = new Set([

const {node} = path
// ensure basic assignment (not += etc)
if (node.operator !== '=') return
// member -> "Xyz.toString"

@@ -80,0 +82,0 @@ const member = node.left

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc