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

common-shakeify

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

common-shakeify - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

test/api.js

11

index.js

@@ -5,5 +5,10 @@ 'use strict'

const transformAst = require('transform-ast')
const wrapComment = require('wrap-comment')
const through = require('through2')
module.exports = function commonShake (b, opts) {
if (typeof b !== 'object') {
throw new Error('common-shakeify: must be used as a plugin, not a transform')
}
const basedir = b._options.basedir || process.cwd()

@@ -125,8 +130,4 @@ const seen = {}

function commentify (str) {
return `/* common-shake removed: ${safeComment(str)} */`
return wrapComment(`common-shake removed: ${str}`)
}
function safeComment (str) {
return str.replace(/\*\//g, '*\\/')
}
}
{
"name": "common-shakeify",
"version": "0.2.0",
"version": "0.3.0",
"description": "browserify tree shaking plugin using @indutny common-shake",

@@ -27,3 +27,4 @@ "main": "index.js",

"through2": "^2.0.3",
"transform-ast": "^2.1.0"
"transform-ast": "^2.1.0",
"wrap-comment": "^1.0.0"
},

@@ -30,0 +31,0 @@ "devDependencies": {

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