Skip to content

Commit 286ad64

Browse files
committed
Auto-merged master into escaped-lookup-test on deployment.
2 parents 7e83df9 + 85bccf6 commit 286ad64

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,25 @@ var output = Mustache.render("{{title}} spends {{calc}}", view);
111111

112112
In this example, the `Mustache.render` function takes two parameters: 1) the [mustache](http://mustache.github.com/) template and 2) a `view` object that contains the data and code needed to render the template.
113113

114+
## API
115+
116+
Following is an [rtype](https://git.io/rtype) signature of the most commonly used functions.
117+
118+
```js
119+
Mustache.render(
120+
template : String,
121+
view : Object,
122+
partials? : Object,
123+
) => String
124+
125+
Mustache.parse(
126+
template : String,
127+
tags = ['{{', '}}'] : Tags,
128+
) => String
129+
130+
interface Tags [String, String]
131+
```
132+
114133
## Templates
115134

116135
A [mustache](http://mustache.github.com/) template is a string that contains any number of mustache tags. Tags are indicated by the double mustaches that surround them. `{{person}}` is a tag, as is `{{#person}}`. In both examples we refer to `person` as the tag's key. There are several types of tags available in mustache.js, described below.

0 commit comments

Comments
 (0)