Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/twisterghost/minimap

Glorified find and replace for super simple templating.
https://github.com/twisterghost/minimap

Last synced: about 2 months ago
JSON representation

Glorified find and replace for super simple templating.

Awesome Lists containing this project

README

        

# minimap

Simple data mapping and string templating without the bells and whistles.

## Require it

`var minimap = require('minimap');`

## Use it

```JavaScript
var template = 'Welcome to {siteTitle}, {name}!';
var str = minimap.map({
siteTitle: 'NPM',
name: 'John'
}, template);

console.log(str) // Welcome to NPM, John!
```

### Always replace

`minimap.always({'token' : 'value'});`

### Never replace

`minimap.never('token');`