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

xjst

Package Overview
Dependencies
Maintainers
4
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xjst - npm Package Compare versions

Comparing version 0.11.0 to 0.11.1

28

lib/xjst/compiler.js

@@ -212,20 +212,22 @@ var xjst = require('../xjst'),

if (ast._extensions && ast._extensions.length) {
if (ast._extensions) {
body.push('exports.registerExtensions = $$registerExtensions;');
body.push('function $$registerExtensions(ctx) {');
ast._extensions.forEach(function(ext) {
var fn = 'function $$registerExtensions(ctx) {';
fn += ast._extensions.map(function(ext) {
if (/^[a-z$_][a-z0-9$_]*$/gi.test(ext))
body.push(' ctx.' + ext + ' = undefined;');
return ' ctx.' + ext + ' = undefined;';
else
body.push(' ctx[' + JSON.stringify(ext) + '] = undefined;');
});
body.push('}');
return ' ctx[' + JSON.stringify(ext) + '] = undefined;';
}).join('');
fn += '}';
body.unshift(fn);
}
if (ast._applyFlags && ast._applyFlags.length) {
body.push('function $$resetApplyNext(ctx) {');
ast._applyFlags.forEach(function(flag) {
body.push(' ctx.' + flag + ' = undefined;');
});
body.push('}');
if (ast._applyFlags) {
var fn = 'function $$resetApplyNext(ctx) {';
fn += ast._applyFlags.map(function(ext) {
return ' ctx.' + ext + ' = undefined;';
}).join('');
fn += '}';
body.unshift(fn);
}

@@ -232,0 +234,0 @@

{
"name": "xjst",
"description": "XSLT inspired JavaScript templates (with spices)",
"version": "0.11.0",
"version": "0.11.1",
"homepage": "http://github.com/veged/xjst",

@@ -6,0 +6,0 @@ "author": "Sergey Berezhnoy <veged@mail.ru> (http://github.com/veged)",

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