Extract mustache tokens from a file or string.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib refactored, cut a lot of code Apr 30, 2013
test refactored tests Apr 30, 2013
.gitignore Initial commit. Aug 7, 2012
.travis.yml docs update, package update Apr 30, 2013
CHANGELOG.md docs update, package update Apr 30, 2013
LICENSE Updated license Aug 7, 2012
README.md v0.1.0 Apr 30, 2013
package.json v0.1.0 Apr 30, 2013

README.md

Node.js - tweezers

build status

tweezers extracts your mustache, hogan.js, handelbars or any arbitrary tokens. It's colloquially named to stick with the "mustache" theme.

Why?

Sometimes you want to know what the mustache tokens are in a file or string before your compile and render.

Installation

npm install --save tweezers

API

tweeze(string, [open], [close])

Extract the tokens into an array.

var tweeze = require('tweezers');

 var data = "Hello {{name}}!\nMay I send you an email to {{email}}?"
data += "\nI'd really love to talk to you at {{email}}, please?"

var tokens = tweeze(data);
console.dir(tokens); //{ name: 1, email: 2 }

License

(MIT License)

Copyright 2012, JP Richardson