Просмотр исходного кода

Removing the rtype API definitions from README

Primarily because [rtype](https://github.com/ericelliott/rtype) seems to
be a stalled project that hasn't gotten updated for 4 years.

Similar more up-to-date definitions can be found in the
TypeScript definitions: [@types/mustache](https://www.npmjs.com/package/@types/mustache).
tags/v4.0.0
Phillip Johnsen GitHub 6 лет назад
Родитель
Сommit
c41045baf8
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: 4AEE18F83AFDEB23
1 измененных файлов: 0 добавлений и 23 удалений
  1. +0
    -23
      README.md

+ 0
- 23
README.md Просмотреть файл

@@ -106,29 +106,6 @@ var output = Mustache.render("{{title}} spends {{calc}}", view);


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. 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.


## API

Following is an [rtype](https://git.io/rtype) signature of the most commonly used functions.

```js
Mustache.render(
template : String,
view : Object,
partials? : Object,
tags = ['{{', '}}'] : Tags,
) => String

Mustache.parse(
template : String,
tags = ['{{', '}}'] : Tags,
) => Token[]

interface Token [String, String, Number, Number, Token[]?, Number?]

interface Tags [String, String]

```

## Templates ## Templates


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. 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.


Загрузка…
Отмена
Сохранить