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

vandyke-toolkit

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vandyke-toolkit - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

2

bower.json
{
"name": "vandyke-toolkit",
"version": "0.0.0",
"version": "0.0.1",
"description": "Toolkit for the VanDyke template engine",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -7,7 +7,7 @@ ;(function (root, factory) {

// AMD
define(['module', 'exports', 'require', 'cla55', './writer', './traverser'], factory);
define(['require', 'exports', 'module', 'cla55', './writer', './traverser'], factory);
} else {
console && console.error('Unsupported module environment.'); // jshint ignore:line
}
}(this, function (module, exports, require) {
}(this, function (require, exports, module) {

@@ -209,4 +209,15 @@ 'use strict';

before: function (ctx, node) {
if (node.attributes.length >= 1) {
this.content().write(', {');
var hasExpression = node.attributes.filter(function (child) {
return child.type === 'Expression';
}).length > 0;
if (hasExpression) {
this.option('.attributes_spread', true);
// Register use of component shortcut
this.setProxy('spread');
this.content().write(', spread(');
} else if (node.attributes.length >= 1) {
this.content().write(',');
} else {

@@ -217,10 +228,24 @@ this.content().write(', null');

beforeEach: function (ctx, node, i) {
// Separation comma
if (i) {
this.content().write(', ');
}
// Open object for properties
if (node.attributes[i].type === 'Property' && (!node.attributes[i - 1] || node.attributes[i - 1].type !== 'Property')) {
this.content().write('{');
}
},
after: function (ctx, node) {
if (node.attributes.length >= 1) {
afterEach: function (ctx, node, i) {
// Close object for properties
if (node.attributes[i].type === 'Property' && (!node.attributes[i + 1] || node.attributes[i + 1].type !== 'Property')) {
this.content().write('}');
}
},
after: function () {
if (this.option('.attributes_spread')) {
this.content().write(')');
this.option('.attributes_spread', false);
}
}

@@ -227,0 +252,0 @@ }

{
"name": "vandyke-toolkit",
"version": "0.0.0",
"version": "0.0.1",
"description": "Toolkit for the VanDyke template engine",

@@ -8,3 +8,3 @@ "license": "MIT",

"name": "Evan Vosberg",
"email": "evanvosberg@inext.me"
"email": "evanvosberg@urban.to"
},

@@ -11,0 +11,0 @@ "homepage": "https://github.com/brix/vandyke-toolkit",

@@ -7,7 +7,7 @@ ;(function (root, factory) {

// AMD
define(['module', 'exports', 'require', 'cla55', './tokenizer'], factory);
define(['require', 'exports', 'module', 'cla55', './tokenizer'], factory);
} else {
console && console.error('Unsupported module environment.'); // jshint ignore:line
}
}(this, function (module, exports, require) {
}(this, function (require, exports, module) {

@@ -154,4 +154,4 @@ 'use strict';

Attribute: function Attribute() {
var node = this.createNode('Property'),
token = this.token();
var token = this.token(),
node;

@@ -167,29 +167,35 @@ // Expect white space

// Expect identifier
this.expect(token.is('Identifier'));
this.expect(token.is('Identifier') || (token.is('Punctuator') && token.hasValue('{')));
// Check whether the attribute is an event listener
this.option('._ctx_listener', token.hasValue(/^on/));
if (token.is('Identifier')) {
node = this.createNode('Property');
// Get name identifier
node.name = this.Identifier();
// Check whether the attribute is an event listener
this.option('._ctx_listener', token.hasValue(/^on/));
// Read token
token = this.token();
// Get name identifier
node.name = this.Identifier();
if (token.is('Punctuator') && token.hasValue('=')) {
// Attribute with value
this.next();
// Read token
token = this.token();
// Detect value
node.value = this.detect('String', 'Expression');
if (token.is('Punctuator') && token.hasValue('=')) {
// Attribute with value
this.next();
this.expect(node.value);
// Detect value
node.value = this.detect('String', 'Expression');
this.expect(node.value);
} else {
// Attribute without value
node.value = null;
}
// Clear listener context
this.option('._ctx_listener', false);
} else {
// Attribute without value
node.value = null;
node = this.Expression();
}
// Clear listener context
this.option('._ctx_listener', false);
return node;

@@ -196,0 +202,0 @@ },

@@ -7,7 +7,7 @@ ;(function (root, factory) {

// AMD
define(['module', 'exports', 'require', 'cla55', './composer', './parser'], factory);
define(['require', 'exports', 'module', 'cla55', './composer', './parser'], factory);
} else {
console && console.error('Unsupported module environment.'); // jshint ignore:line
}
}(this, function (module, exports, require) {
}(this, function (require, exports, module) {

@@ -14,0 +14,0 @@ 'use strict';

@@ -7,7 +7,7 @@ ;(function (root, factory) {

// AMD
define(['module', 'exports', 'require', 'cla55'], factory);
define(['require', 'exports', 'module', 'cla55'], factory);
} else {
console && console.error('Unsupported module environment.'); // jshint ignore:line
}
}(this, function (module, exports, require) {
}(this, function (require, exports, module) {

@@ -14,0 +14,0 @@ 'use strict';

@@ -7,7 +7,7 @@ ;(function (root, factory) {

// AMD
define(['module', 'exports', 'require', 'cla55', './token'], factory);
define(['require', 'exports', 'module', 'cla55', './token'], factory);
} else {
console && console.error('Unsupported module environment.'); // jshint ignore:line
}
}(this, function (module, exports, require) {
}(this, function (require, exports, module) {

@@ -14,0 +14,0 @@ 'use strict';

@@ -7,7 +7,7 @@ ;(function (root, factory) {

// AMD
define(['module', 'exports', 'require', 'cla55'], factory);
define(['require', 'exports', 'module', 'cla55'], factory);
} else {
console && console.error('Unsupported module environment.'); // jshint ignore:line
}
}(this, function (module, exports, require) {
}(this, function (require, exports, module) {

@@ -14,0 +14,0 @@ 'use strict';

@@ -7,7 +7,7 @@ ;(function (root, factory) {

// AMD
define(['module', 'exports', 'require', 'vandyke', './composer', './parser', './register', './token', './tokenizer', './traverser', './writer'], factory);
define(['require', 'exports', 'module', 'vandyke', './composer', './parser', './register', './token', './tokenizer', './traverser', './writer'], factory);
} else {
console && console.error('Unsupported module environment.'); // jshint ignore:line
}
}(this, function (module, exports, require) {
}(this, function (require, exports, module) {

@@ -14,0 +14,0 @@ 'use strict';

@@ -7,7 +7,7 @@ ;(function (root, factory) {

// AMD
define(['module', 'exports', 'require', 'cla55'], factory);
define(['require', 'exports', 'module', 'cla55'], factory);
} else {
console && console.error('Unsupported module environment.'); // jshint ignore:line
}
}(this, function (module, exports, require) {
}(this, function (require, exports, module) {

@@ -14,0 +14,0 @@ 'use strict';

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