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

flex-combo

Package Overview
Dependencies
Maintainers
2
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flex-combo - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

38

flex-combo.js

@@ -150,24 +150,7 @@ var http = require('http')

}
if(fs.existsSync(absPath)){
var buff = fs.readFileSync(absPath);
if(isBinFile(absPath)){
cosoleResp('Local', absPath);
return buff;
}
var charset = isUtf8(buff) ? 'utf8' : 'gbk';
//允许为某个url特别指定编码
var outputCharset = param.charset;
if(param.urlBasedCharset && param.urlBasedCharset[longestMatchPos]){
outputCharset = param.urlBasedCharset[longestMatchPos];
}
cosoleResp('Local', absPath);
return adaptCharset(buff, outputCharset, charset);
}
//前后端模板一致化,如果是*.html.js格式的请求,并且js文件不存在,则编译*.html为juicer的function格式返回
var extName = path.extname(absPath);
var htmlName = absPath.slice(0, absPath.length - extName.length);
if(path.extname(htmlName).toLowerCase() === '.html' ){
if(path.extname(htmlName).toLowerCase() === '.html' && fs.existsSync(htmlName)){
var buff = fs.readFileSync(htmlName);

@@ -186,4 +169,23 @@ var charset = isUtf8(buff) ? 'utf8' : 'gbk';

cosoleResp('Local Juicer Compile', htmlName);
fs.writeFile(absPath, tempalteFunction);
return iconv.encode(tempalteFunction, outputCharset);
}
if(fs.existsSync(absPath)){
var buff = fs.readFileSync(absPath);
if(isBinFile(absPath)){
cosoleResp('Local', absPath);
return buff;
}
var charset = isUtf8(buff) ? 'utf8' : 'gbk';
//允许为某个url特别指定编码
var outputCharset = param.charset;
if(param.urlBasedCharset && param.urlBasedCharset[longestMatchPos]){
outputCharset = param.urlBasedCharset[longestMatchPos];
}
cosoleResp('Local', absPath);
return adaptCharset(buff, outputCharset, charset);
}
}

@@ -190,0 +192,0 @@ return null;

{
"name": "flex-combo",
"version": "0.5.0",
"version": "0.5.1",
"description": "The Flex-combo is combo tool designed for web front-end developer. It support various kinds of combo format by modify configuration(eg. yahoo combo).",

@@ -5,0 +5,0 @@ "main": "flex-combo.js",

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