tweezers

0.1.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    393
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    393
  • 0.0.1
    0

Package Sidebar

Install

npm i tweezers

Weekly Downloads

393

Version

0.1.0

License

none

Last publish

Collaborators

  • jprichardson