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

yog-swig

Package Overview
Dependencies
Maintainers
3
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.0.5 to 0.0.6

lib/loader.js

16

index.js

@@ -8,2 +8,3 @@ /**

var EventEmitter = require("events").EventEmitter;
var loader = require('./lib/loader.js');
var tags = [

@@ -56,12 +57,7 @@ "script",

options.loader = options.loader || loader(api, options.views);
var self = this;
var swig = this.swig = new Swig(options);
var origin = this.swig.options.loader.resolve;
this.swig.options.loader.resolve = function(to, from) {
to = api.resolve(to);
return origin.call(this, to, from);
};
tags.forEach(function (tag) {

@@ -92,2 +88,8 @@ var t = require('./tags/' + tag);

});
};
SwigWrap.prototype.destroy = function() {
this.emit('destroy');
this.removeAllListeners();
this.swig = null;
};
{
"name": "yog-swig",
"version": "0.0.5",
"version": "0.0.6",
"description": "custom swig template, add some tag or filter ",

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

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

content.push('</html>');
var code = '_ctx._yog.setFramework(_ctx._yog.getUri(' + args.pop() + '));' +
var code = '_ctx._yog.setFramework(' + args.pop() + ');' +
compiler(content, parents, options, blockName);

@@ -9,0 +9,0 @@ return code;

var exports = module.exports;
exports.compile = function(compiler, args, content, parents, options, blockName) {
return '_output += _swig._r().fis.getUri(' + args.shift() + ');';
return '_output += _ctx._yog.resolve(' + args.shift() + ');';
};

@@ -6,0 +6,0 @@

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