Skip to content

Commit 9734bfb

Browse files
committedJul 15, 2015
Giving away condition interpolation in favour of flat [eval]
1 parent 19da0b5 commit 9734bfb

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed
 

‎src/interpolation/Interpolator.js

-9
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,6 @@ Interpolator.prototype.rules = {
6666
return interpolator.readContextPath(context, value.slice(1))
6767
}
6868
},
69-
{
70-
name: "conditional statement",
71-
match: function(value) { return /(.+)(>|==|===|!=|!==|<|>=|<=)(.+)/.test(value) },
72-
action: function(interpolator, context, value) {
73-
with(context) {
74-
return eval(value)
75-
}
76-
}
77-
},
7869
{
7970
name: "markup resolver",
8071
match: function(value) { return value.indexOf("[") > -1 },

‎stress-test/stress-workflows/workflow1.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
},
2020
{
2121
"task": "while",
22-
"test": "objectList.length > 0",
22+
"test": "[eval]objectList.length > 0[/eval]",
2323
"subflow": [
2424
{
2525
"task": "lodash/initial",

0 commit comments

Comments
 (0)
Please sign in to comment.