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

xjst

Package Overview
Dependencies
Maintainers
2
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.7.12 to 0.7.13

57

lib/xjst/compiler/index.js

@@ -55,3 +55,8 @@ var esprima = require('esprima'),

'exports.apply = function apply(ctx) {\n' +
' return applyc(ctx || this);\n' +
' try {\n' +
' return applyc(ctx || this);\n' +
' } catch (e) {\n' +
' e.xjstContext = ctx || this;\n' +
' throw e;\n' +
' }\n' +
'};' +

@@ -699,2 +704,8 @@ 'function applyc(ctx) {\n' +

}, this),
applyContext = {
type: 'LogicalExpression',
operator: '||',
left: { type: 'Identifier', name: 'ctx' },
right: { type: 'ThisExpression' }
},
apply = {

@@ -711,13 +722,37 @@ type: 'FunctionDeclaration',

body: [{
type: 'ReturnStatement',
argument: {
type: 'CallExpression',
callee: { type: 'Identifier', name: 'applyc' },
arguments: [{
type: 'LogicalExpression',
operator: '||',
left: { type: 'Identifier', name: 'ctx' },
right: { type: 'ThisExpression' }
type: 'TryStatement',
block: {
type: 'BlockStatement',
body: [{
type: 'ReturnStatement',
argument: {
type: 'CallExpression',
callee: { type: 'Identifier', name: 'applyc' },
arguments: [applyContext]
}
}]
}
},
guardedHandlers: [],
handlers: [{
type: 'CatchClause',
param: { type: 'Identifier', name: 'e' },
body: {
type: 'BlockStatement',
body: [{
type: 'ExpressionStatement',
expression: {
type: 'AssignmentExpression',
operator: '=',
left: {
type: 'MemberExpression',
computed: false,
object: applyContext,
property: { type: 'Identifier', name: 'xjstContext' }
},
right: { type: 'Identifier', name: 'e' }
}
}]
}
}],
finalizer: null
}]

@@ -724,0 +759,0 @@ }

2

package.json
{
"name": "xjst",
"description": "XSLT inspired JavaScript templates (with spices)",
"version": "0.7.12",
"version": "0.7.13",
"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