Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/twisterghost/minimap
- Owner: twisterghost
- License: mit
- Created: 2013-05-26T16:02:17.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-27T13:36:25.000Z (almost 10 years ago)
- Last Synced: 2024-10-31T17:59:23.890Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 227 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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');`