From f308509e103fe48a85dd029075ce7febfedd23ae Mon Sep 17 00:00:00 2001 From: Ziang Song Date: Fri, 15 Feb 2013 16:01:08 -0500 Subject: [PATCH] Update README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index bd8f460..6a7a0d8 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,17 @@ console.log(result); ``` + * You can also do key-value interpolate like this + +```javascript + +var input = "The quick brown %{f} jumps over the lazy %{d}."; +var data = {"f": "fox", "d": "dog"}; +var result = Kiwi.compose(input, data); +console.log(result); + +//Output: The quick brown fox jumps over the lazy dog. + +SYNTAX ERROR will be thrown if the input string contains non-matching curly brackets. + +```