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

dresscode-resources

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dresscode-resources - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

21

index.js

@@ -43,3 +43,3 @@ var {DressCode} = require('dresscodejs');

if (diritems) {
var result = '';
var result = [];
var resources = [];

@@ -55,7 +55,9 @@ await Promise.all(diritems.map(async(fname) => {

var mimeType = mime.getType(path.extname(fname));
result += `${cname}['${normalizedLocalName}'] = new ${ctor}('${mimeType}', '${Buffer.from(fcontent, 'binary').toString('base64')}');\n`;
result.push({
fname: fname,
content: `${cname}['${normalizedLocalName}'] = new ${ctor}('${mimeType}', '${Buffer.from(fcontent, 'binary').toString('base64')}');\n`
});
resources.push(fname);
} else if (stat.isDirectory()) {
var [dirresult, dirresources] = await compileResources(basedir, localName, cname, ctor);
result += dirresult;
var diritems = dirresources.map((resource) => {

@@ -65,9 +67,18 @@ resources.push(`${fname}/${resource}`);

});
result += `${cname}['${localName}'] = {\n${diritems.join(',\n')}\n};\n`
result.push({
fname: fname,
content: `${dirresult}${cname}['${localName}'] = {\n${diritems.join(',\n')}\n};\n`
})
}
}
}));
return [result, resources];
result.sort((item1, item2) => {
return item1.fname > item2.fname ? 1 : item1.fname < item2.fname ? -1 : 0;
});
var textResult = result.map((item) => {
return item.content;
}).join('');
return [textResult, resources];
}
return [];
}
{
"name": "dresscode-resources",
"version": "0.0.4",
"version": "0.0.5",
"description": "Compiler from binary files to JavaScript-code in DressCodeJS-notation.",

@@ -5,0 +5,0 @@ "main": "index.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