Socket
Socket
Sign inDemoInstall

ember-cli-htmlbars

Package Overview
Dependencies
Maintainers
2
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-htmlbars - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

21

ext/plugins/transform-each-in-to-hash.js

@@ -11,5 +11,4 @@ var Walker = require('htmlbars').Walker;

var stringNode = {
type: 'STRING',
string: keyword,
stringModeValue: keyword,
type: 'StringLiteral',
value: keyword,
original: keyword

@@ -20,3 +19,3 @@ };

node.sexpr.hash = {
type: 'hash',
type: 'Hash',
pairs: []

@@ -26,3 +25,9 @@ };

node.sexpr.hash.pairs.push(['keyword', stringNode]);
var hashPair = {
type: 'HashPair',
key: 'keyword',
value: stringNode
};
node.sexpr.hash.pairs.push(hashPair);
}

@@ -35,7 +40,7 @@ });

function validate(node) {
return (node.type === 'block' || node.type === 'mustache') &&
node.sexpr.id.original === 'each' &&
return (node.type === 'BlockStatement' || node.type === 'MustacheStatement') &&
node.sexpr.path.original === 'each' &&
node.sexpr.params.length === 3 &&
node.sexpr.params[1].type === 'ID' &&
node.sexpr.params[1].type === 'PathExpression' &&
node.sexpr.params[1].original === 'in';
}

@@ -11,5 +11,4 @@ var Walker = require('htmlbars').Walker;

var stringNode = {
type: 'STRING',
string: keyword,
stringModeValue: keyword,
type: 'StringLiteral',
value: keyword,
original: keyword

@@ -20,3 +19,3 @@ };

node.sexpr.hash = {
type: 'hash',
type: 'Hash',
pairs: []

@@ -26,3 +25,9 @@ };

node.sexpr.hash.pairs.push(['keywordName', stringNode]);
var hashPair = {
type: 'HashPair',
key: 'keywordName',
value: stringNode
};
node.sexpr.hash.pairs.push(hashPair);
}

@@ -35,7 +40,7 @@ });

function validate(node) {
return node.type === 'block' &&
node.sexpr.id.original === 'with' &&
return node.type === 'BlockStatement' &&
node.sexpr.path.original === 'with' &&
node.sexpr.params.length === 3 &&
node.sexpr.params[1].type === 'ID' &&
node.sexpr.params[1].type === 'PathExpression' &&
node.sexpr.params[1].original === 'as';
}
{
"name": "ember-cli-htmlbars",
"version": "0.4.0",
"version": "0.4.1",
"description": "A library for adding htmlbars to ember CLI",

@@ -34,4 +34,4 @@ "main": "index.js",

"ember-template-compiler": "^1.9.0-alpha",
"htmlbars": "^0.2.0"
"htmlbars": "^0.3.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc