Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-extract-string

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-extract-string - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

src/.tern-port

2

package.json
{
"name": "babel-plugin-extract-string",
"version": "1.1.0",
"version": "1.1.1",
"description": "Babel plugin to extract string from js source file then save into array",

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

@@ -21,3 +21,3 @@ var fs = require('fs')

var str = path.node.value
if(!name || str.trim()=='use strict') return
if(!name || !str || str.trim()=='use strict') return
var index = addToSet(arr, str)

@@ -24,0 +24,0 @@ path.replaceWith(t.memberExpression(t.identifier(name), t.numericLiteral(index), true))

@@ -25,2 +25,7 @@ import { transform } from 'babel-core'

// empty strings
var a = transform(`var d ='dd'; b=''; c='dd';`, babelTranslationOptions({name: 'abc'}))
assert.equal(a.code, `var d = abc[0];b = '';c = abc[0];`)
assert.deepEqual(a.metadata._store, [ 'dd' ])
// don't touch ObjectProperty

@@ -27,0 +32,0 @@ var a = transform(`var d = {'aaa': 123};`, babelTranslationOptions({name: 'abc'}))

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