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

fis-optimizer-uglify-js

Package Overview
Dependencies
Maintainers
4
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fis-optimizer-uglify-js - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

48

index.js

@@ -11,36 +11,40 @@ /*

module.exports = function(content, file, conf){
conf.fromString = true;
var mapping = fis.file.wrap(file.dirname + '/' + file.filename + '.map');
if (conf.sourceMap) {
var mapping = fis.file.wrap(file.dirname + '/' + file.filename + '.map');
conf.outSourceMap = file.filename + '.org' + file.rExt;
}
conf.fromString = true;
conf.outSourceMap = file.filename + '.org' + file.rExt;
var ret = UglifyJS.minify(content, conf);
mapping.useDomain = true;
mapping.useHash = true;
if (conf.sourceMap) {
mapping.useDomain = true;
mapping.useHash = true;
var mapData = JSON.parse(ret.map);
var mapData = JSON.parse(ret.map);
mapData.sources = [mapData.file];
mapData.sourcesContent = [content];
mapData.sources = [mapData.file];
mapData.sourcesContent = [content];
var newData = {
version: mapData.version,
file: mapData.file,
sources: mapData.sources,
sourcesContent: mapData.sourcesContent,
names: mapData.names,
mappings: mapData.mappings
};
var newData = {
version: mapData.version,
file: mapData.file,
sources: mapData.sources,
sourcesContent: mapData.sourcesContent,
names: mapData.names,
mappings: mapData.mappings
};
mapping.setContent(JSON.stringify(newData));
mapping.setContent(JSON.stringify(newData));
file.extras = file.extras || {};
file.extras.derived = file.extras.derived || [];
file.extras.derived.push(mapping);
file.extras = file.extras || {};
file.extras.derived = file.extras.derived || [];
file.extras.derived.push(mapping);
ret.code += '\n//# sourceMappingURL={{url:'+mapping.subpath + '}}\n';
ret.code += '\n//# sourceMappingURL={{url:'+mapping.subpath + '}}\n';
}
return ret.code;
};
{
"name" : "fis-optimizer-uglify-js",
"description" : "A optimizer for fis to compress js by using uglify-js.",
"version" : "0.1.4",
"version" : "0.1.5",
"author" : "FIS Team <fis@baidu.com>",

@@ -6,0 +6,0 @@ "homepage" : "http://fis.baidu.com/",

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