From 3ffc6b282878676c9a9e1a53e66dd01f66b3e1f8 Mon Sep 17 00:00:00 2001 From: John Butler Date: Wed, 19 Oct 2011 22:44:11 +0100 Subject: [PATCH] adding simple test for dot notation support --- examples/dot_notation.html | 6 ++++++ examples/dot_notation.js | 14 ++++++++++++++ examples/dot_notation.txt | 4 ++++ 3 files changed, 24 insertions(+) create mode 100644 examples/dot_notation.html create mode 100644 examples/dot_notation.js create mode 100644 examples/dot_notation.txt diff --git a/examples/dot_notation.html b/examples/dot_notation.html new file mode 100644 index 0000000..8cef14a --- /dev/null +++ b/examples/dot_notation.html @@ -0,0 +1,6 @@ +

{{name}}

+

Price: {{price.currency.symbol}}{{price.value}} {{#price.currency}}{{name}}{{/price.currency}}

+

VAT: {{price.currency.symbol}}{{price.vat}}

+{{#in_stock}} +

Available Now

+{{/in_stock}} \ No newline at end of file diff --git a/examples/dot_notation.js b/examples/dot_notation.js new file mode 100644 index 0000000..707174c --- /dev/null +++ b/examples/dot_notation.js @@ -0,0 +1,14 @@ +var dot_notation = { + name: "A Book", + price:{ + value: 200, + vat: function() { + return this.value * 0.2; + }, + currency: { + symbol: '€', + name: 'Euro' + } + }, + in_stock: true +}; \ No newline at end of file diff --git a/examples/dot_notation.txt b/examples/dot_notation.txt new file mode 100644 index 0000000..304ba38 --- /dev/null +++ b/examples/dot_notation.txt @@ -0,0 +1,4 @@ +

A Book

+

Price: €200 Euro

+

VAT: €40

+

Available Now