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

stringify

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

stringify - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

32

index.js
module.exports = function (bundle) {
module.exports = function(extra_extensions) {
var extensions = [

@@ -7,16 +7,26 @@ '.text',

'.html',
'.tmpl',
'.hjs',
'.hbs',
'.hogan',
'.handlebars'
'.tmpl'
];
var text_handler = function (body, file) {
return 'module.exports = "' + body + '";\n';
if (Object.prototype.toString.call(extra_extensions) !== '[object Array]') {
extra_extensions = [];
}
for (var i = 0; i < extra_extensions.length; i++) {
if (extensions[extra_extensions[i]]) { continue; }
extensions.push(extra_extensions[i]);
}
var middleware = function (bundle) {
var text_handler = function (body, file) {
return 'module.exports = "' + body + '";\n';
};
for (var i = 0; i < extensions.length; i++) {
bundle.register(extensions[i], text_handler);
}
};
for (var i = 0; i < extensions.length; i++) {
bundle.register(extensions[i], text_handler);
}
return middleware;
};
{
"name": "stringify",
"description": "Browserify plugin to require() text files (templates) inside of your client-side JavaScript files.",
"version": "0.0.1",
"version": "0.0.2",
"main": "./index.js",

@@ -6,0 +6,0 @@ "keywords": [

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