smartmustache/README.md

41 lines
2.0 KiB
Markdown
Raw Normal View History

2019-02-17 16:04:31 +00:00
# @pushrocks/smartmustache
2016-11-20 11:35:46 +00:00
templates done right
2019-02-17 16:04:31 +00:00
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartmustache)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartmustache)
* [github.com (source mirror)](https://github.com/pushrocks/smartmustache)
* [docs (typedoc)](https://pushrocks.gitlab.io/smartmustache/)
2016-11-20 16:54:13 +00:00
## Status for master
2019-02-17 16:04:31 +00:00
[![build status](https://gitlab.com/pushrocks/smartmustache/badges/master/build.svg)](https://gitlab.com/pushrocks/smartmustache/commits/master)
[![coverage report](https://gitlab.com/pushrocks/smartmustache/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartmustache/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartmustache.svg)](https://www.npmjs.com/package/@pushrocks/smartmustache)
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartmustache/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartmustache)
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
2016-11-20 16:54:13 +00:00
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
2016-11-20 11:35:46 +00:00
## Usage
2019-02-17 16:04:31 +00:00
2017-02-25 22:40:15 +00:00
Use TypeScript for best in class instellisense.
2016-11-20 11:35:46 +00:00
```javascript
2019-02-17 16:04:31 +00:00
import { Tlt } from 'tlt';
2016-11-20 11:35:46 +00:00
2019-02-17 16:04:31 +00:00
let myTlt = new Tlt('my {{somePlaceholder}} are {{anotherPlaceholder}}!');
2016-11-20 16:44:56 +00:00
let appliedString = myTlt.applyData({
2019-02-17 16:04:31 +00:00
somePlaceholder: 'horses',
anotherPlaceholder: 'awesome'
});
2016-11-20 16:44:56 +00:00
// appliedString will be 'my horses are awesome!'
2016-11-20 16:54:13 +00:00
```
2019-02-17 16:04:31 +00:00
For further information read the linked docs at the top of this readme.
2017-02-25 22:40:15 +00:00
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
2019-02-17 16:04:31 +00:00
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)