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

ecoify

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecoify - npm Package Compare versions

Comparing version 1.0.0 to 1.1.1

20

index.js
var compile = function(file, data) {
var eco = require('eco')
var content = eco.compile(data)
return "module.exports = " + content + ";"
var result = []
result.push("var template = " + content + ";")
// Allow to add hook to render, if `window.app.__render` defined it will be called
// as `app.__render(template, variables)`.
// It's usefull if you want to alter how template works, for example inject additional
// variables.
result.push("module.exports = function(variables){")
result.push(" if(window.app.__render) return window.app.__render(template, variables);")
result.push(" else return template(variables);")
result.push("};")
return result.join("\n")
}

@@ -15,6 +27,3 @@

if (!isEco(file)) return through();
var data = '';
return through(write, end);
var data = '';
var write = function (buf) { data += buf }

@@ -25,2 +34,3 @@ var end = function () {

}
return through(write, end);
};
{
"name": "ecoify",
"version": "1.0.0",
"version": "1.1.1",
"description": "browserify v2 plugin for eco templates.",

@@ -5,0 +5,0 @@ "keywords": ["browserify", "eco", "template"],

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