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

flex-combo

Package Overview
Dependencies
Maintainers
1
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.2.4 to 0.2.5

28

flex-combo.js

@@ -56,2 +56,5 @@ var http = require('http')

function isBinFile(fileName){
return !/.js$|.css$|.less$/.test(fileName);
}
/*

@@ -82,2 +85,5 @@ * 根据一个文件的全路径(如:/xxx/yyy/aa.js)从本地文件系统获取内容

var buff = fs.readFileSync(absPath);
if(isBinFile(absPath)){
return buff;
}
var charset = isUtf8(buff) ? 'utf8' : 'gbk';

@@ -115,2 +121,5 @@ return adaptCharset(buff, param.charset, charset);

var buff = fs.readFileSync(absPath);
if(isBinFile(absPath)){
return buff;
}
var charset = isUtf8(buff) ? 'utf8' : 'gbk';

@@ -181,4 +190,13 @@ return adaptCharset(buff, param.charset, charset);

var buff = joinbuffers(buffs);
//fix 80% situation bom problem.quick and dirty
if(buff[0] === 239 && buff[1] === 187 && buff[2] === 191) {
buff = buff.slice(3, buff.length);
}
if(isBinFile(url)){
cacheFile(url, buff);
res.end(buff);
return;
}
var charset = isUtf8(buff) ? 'utf8' : 'gbk';
var singleFileContent = adaptCharset(buff, param.charset, charset);

@@ -268,6 +286,10 @@ cacheFile(url, buff, charset);

}
var fileName = crypto.createHash('md5').update(reqArray[id].file).digest('hex');
if(isBinFile(reqArray[id].file)){
reqArray[id].content = buff;
cacheFile('/'+fileName, buff);
return;
}
var charset = isUtf8(buff) ? 'utf8' : 'gbk';
reqArray[id].content = adaptCharset(buff, param.charset, charset);
var fileName = crypto.createHash('md5').update(reqArray[id].file).digest('hex');
cacheFile('/'+fileName, buff, charset);

@@ -274,0 +296,0 @@ sendData();

2

package.json
{
"name": "flex-combo",
"version": "0.2.4",
"version": "0.2.5",
"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