broadway-handlebars
Advanced tools
Comparing version 0.2.2 to 0.2.3
40
index.js
@@ -82,8 +82,8 @@ var _ = require('lodash'), | ||
Handlebars.registerHelper('ifeval', function(expression, options) { | ||
var conditional = false; | ||
with(this) { | ||
conditional = eval(expression); | ||
} | ||
return conditional ? options.fn(this) : options.inverse(this); | ||
}); | ||
var conditional = false; | ||
with(this) { | ||
conditional = eval(expression); | ||
} | ||
return conditional ? options.fn(this) : options.inverse(this); | ||
}); | ||
@@ -94,15 +94,16 @@ // Similar to standard print {{value}}, but with an optional fallback value. | ||
Handlebars.registerHelper('def', function(expression, options) { | ||
var val = null, | ||
def = options.hash.def || ''; | ||
var val = null, | ||
def = options.hash.def || ''; | ||
try { | ||
with(this) { | ||
val = eval(expression); | ||
} | ||
} | ||
catch (e) { | ||
val = expression; | ||
} | ||
return val ? val : def; | ||
}); | ||
try { | ||
with(this) { | ||
val = eval(expression); | ||
} | ||
} | ||
catch (e) { | ||
val = expression; | ||
} | ||
return val ? val : def; | ||
}); | ||
@@ -152,2 +153,5 @@ // Inject external handlebar helpers. | ||
// expose the instance of hb so that helpers or other things can be attached async. | ||
this.render.instance = Handlebars; | ||
var _compile = function(view, markup) { | ||
@@ -154,0 +158,0 @@ |
{ | ||
"name": "broadway-handlebars", | ||
"version": "0.2.2", | ||
"main": "index", | ||
"description": "Plugin for flatiron/broadway for rendering with the handlebars view engine.", | ||
"keywords": [ | ||
"node", | ||
"flatiron", | ||
"broadway", | ||
"handlebars", | ||
"html", | ||
"render" | ||
], | ||
"author": { | ||
"name": "Vast", | ||
"email": "", | ||
"web": "http://vastdevblog.vast.com/" | ||
}, | ||
"license": "MIT", | ||
"version": "0.2.3", | ||
"main": "index", | ||
"description": "Plugin for flatiron/broadway for rendering with the handlebars view engine.", | ||
"keywords": [ | ||
"node", | ||
"flatiron", | ||
"broadway", | ||
"handlebars", | ||
"html", | ||
"render" | ||
], | ||
"author": { | ||
"name": "Vast", | ||
"email": "", | ||
"web": "http://vastdevblog.vast.com/" | ||
}, | ||
"license": "MIT", | ||
"repository": { | ||
@@ -34,14 +34,13 @@ "type": "git", | ||
"dependencies": { | ||
"lodash": "1.0.1", | ||
"handlebars": "~1.0.11", | ||
"broadway": "0.2.6", | ||
"lodash": "1.3.x", | ||
"handlebars": "~1.0.11", | ||
"findit": "0.1.2", | ||
"async": "0.2.5" | ||
}, | ||
"async": "0.2.6" | ||
}, | ||
"devDependencies": { | ||
"tap": "*" | ||
}, | ||
"tap": "*", | ||
"broadway": "0.2.7" | ||
}, | ||
"optionalDependencies": {}, | ||
"homepage": "http://vastdevblog.vast.com/" | ||
} | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11059
4
285
2
+ Addedasync@0.2.6(transitive)
+ Addedlodash@1.3.1(transitive)
- Removedbroadway@0.2.6
- Removedarray-buffer-byte-length@1.0.1(transitive)
- Removedasync@0.1.220.2.100.2.5(transitive)
- Removedavailable-typed-arrays@1.0.7(transitive)
- Removedbroadway@0.2.6(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removedcliff@0.1.8(transitive)
- Removedcolors@0.6.2(transitive)
- Removedcycle@1.0.3(transitive)
- Removeddeep-equal@2.2.3(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-get-iterator@1.1.3(transitive)
- Removedeventemitter2@0.4.11(transitive)
- Removedeyes@0.1.8(transitive)
- Removedfor-each@0.3.3(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedfunctions-have-names@1.2.3(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-bigints@1.0.2(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedi@0.3.7(transitive)
- Removedini@1.3.8(transitive)
- Removedinternal-slot@1.0.7(transitive)
- Removedis-arguments@1.1.1(transitive)
- Removedis-array-buffer@3.0.4(transitive)
- Removedis-bigint@1.0.4(transitive)
- Removedis-boolean-object@1.1.2(transitive)
- Removedis-callable@1.2.7(transitive)
- Removedis-date-object@1.0.5(transitive)
- Removedis-map@2.0.3(transitive)
- Removedis-number-object@1.0.7(transitive)
- Removedis-regex@1.1.4(transitive)
- Removedis-set@2.0.3(transitive)
- Removedis-shared-array-buffer@1.0.3(transitive)
- Removedis-string@1.0.7(transitive)
- Removedis-symbol@1.0.4(transitive)
- Removedis-weakmap@2.0.2(transitive)
- Removedis-weakset@2.0.3(transitive)
- Removedisarray@2.0.5(transitive)
- Removedlodash@1.0.1(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removednconf@0.6.7(transitive)
- Removedncp@0.2.7(transitive)
- Removedobject-inspect@1.13.3(transitive)
- Removedobject-is@1.1.6(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedobject.assign@4.1.5(transitive)
- Removedpkginfo@0.2.3(transitive)
- Removedpossible-typed-array-names@1.0.0(transitive)
- Removedregexp.prototype.flags@1.5.3(transitive)
- Removedrequest@2.9.203(transitive)
- Removedrimraf@1.0.9(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedset-function-name@2.0.2(transitive)
- Removedside-channel@1.0.6(transitive)
- Removedstack-trace@0.0.10(transitive)
- Removedstop-iteration-iterator@1.0.0(transitive)
- Removedutile@0.1.6(transitive)
- Removedwhich-boxed-primitive@1.0.2(transitive)
- Removedwhich-collection@1.0.2(transitive)
- Removedwhich-typed-array@1.1.16(transitive)
- Removedwinston@0.6.2(transitive)
Updatedasync@0.2.6
Updatedlodash@1.3.x