forked from janl/mustache.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
key lookup when not in root context with undefined/null value fails,
- Loading branch information
1 parent
a463adc
commit 3a10fb2
Showing
10 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
({ | ||
"list": [ | ||
["", "emptyString"], | ||
[[], "emptyArray"], | ||
[0, "zero"], | ||
[null, "null"], | ||
[undefined, "undefined"], | ||
[0/0, "NaN"] | ||
] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{#list}} | ||
{{#.}}{{#.}}{{.}}{{/.}}{{^.}}inverted {{/.}}{{/.}} | ||
{{/list}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
inverted emptyString | ||
inverted emptyArray | ||
inverted zero | ||
inverted null | ||
inverted undefined | ||
inverted NaN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
({ | ||
"name": "David", | ||
"twitter": "@dasilvacontin", | ||
"farray": [ | ||
["Flor", "@florrts"], | ||
["Miquel", null], | ||
["Chris", undefined] | ||
] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{#farray}} | ||
{{#.}}{{#.}}{{.}} {{/.}}{{^.}}no twitter{{/.}}{{/.}} | ||
{{/farray}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Flor @florrts | ||
Miquel no twitter | ||
Chris no twitter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
({ | ||
"name": "David", | ||
"twitter": "@dasilvacontin", | ||
"fobject": [ | ||
{ | ||
"name": "Flor", | ||
"twitter": "@florrts" | ||
}, | ||
{ | ||
"name": "Miquel", | ||
"twitter": null | ||
}, | ||
{ | ||
"name": "Chris", | ||
"twitter": undefined | ||
} | ||
] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{#fobject}} | ||
{{name}}'s twitter: {{#twitter}}{{.}}{{/twitter}}{{^twitter}}unknown{{/twitter}}. | ||
{{/fobject}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Flor's twitter: @florrts. | ||
Miquel's twitter: unknown. | ||
Chris's twitter: unknown. |