Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshgillies/node-matrix-keywords
Render Squiz Matrix keywords with JavaScript!
https://github.com/joshgillies/node-matrix-keywords
Last synced: 5 days ago
JSON representation
Render Squiz Matrix keywords with JavaScript!
- Host: GitHub
- URL: https://github.com/joshgillies/node-matrix-keywords
- Owner: joshgillies
- License: mit
- Created: 2015-04-26T13:05:16.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-20T13:49:47.000Z (over 9 years ago)
- Last Synced: 2024-10-19T00:15:20.113Z (27 days ago)
- Language: JavaScript
- Size: 160 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-matrix-keywords
[![Build Status](https://travis-ci.org/joshgillies/node-matrix-keywords.svg)](https://travis-ci.org/joshgillies/node-matrix-keywords)
Render Squiz Matrix keywords with JavaScript!
## Example
```js
var keywords = require('node-matrix-keywords')var template = 'Page Title: %asset_name%\nPage Type: %asset_type%'
var view = {
name: 'Home',
type: 'Standard Page'
}console.log(keywords.render(template, view))
```## API
### var keywords = require('node-matrix-keywords')
### keywords.render(template, view)
The render function takes two arguments:
* `template`: is a string containing your template
* `view`: is an object representing the data in your template## License
MIT