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

yog-swig

Package Overview
Dependencies
Maintainers
5
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yog-swig - npm Package Compare versions

Comparing version 0.3.1 to 0.4.0

2

package.json
{
"name": "yog-swig",
"version": "0.3.1",
"version": "0.4.0",
"description": "custom swig template, add some tag or filter ",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -16,3 +16,3 @@ var exports = module.exports;

exports.compile = function(compiler, args, content, parents, options, blockName) {
var code = '_ctx._yog.load(' + args.pop() + ');'
var code = '_ctx._yog.load(' + args[0] + ', ' + args[1] + ');'
return code;

@@ -23,8 +23,14 @@ };

parser.on(types.STRING, function (token) {
var self = this;
self.out.push(token.match);
this.out.unshift(token.match);
});
parser.on(types.VAR, function (token) {
if (token.match === 'external') {
this.out.push(true);
}else {
this.out.unshift('_ctx.' + token.match);
}
});
return true;
};
exports.ends = false;
exports.ends = false;
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