This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* npm install d3 node-jsdom | |
*/ | |
var d3 = require('d3'); | |
var jsdom = require('node-jsdom'); | |
var http = require('http'); | |
function svgDOM(width, height) { | |
// Setup DOM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Handlebars.registerHelper("_", function() { | |
var options = [].pop.call(arguments); | |
var func = [].shift.call(arguments); | |
return _[func].apply(_, arguments); | |
}); | |
// Usage: | |
{{_ 'functionName' arg1 arg2 argn}} | |
// Example - _.round() → 4.01 |