Skip to content

Instantly share code, notes, and snippets.

View adamblank's full-sized avatar

Adam Blank adamblank

  • California, US
View GitHub Profile
@adamblank
adamblank / cheese.json
Created December 6, 2013 20:40
JSON array of every type of cheese.
[
"Abbaye de Belloc",
"Abbaye du Mont des Cats",
"Abertam",
"Abondance",
"Ackawi",
"Acorn",
"Adelost",
"Airag",
"Airedale",
@adamblank
adamblank / underscore.reverseTemplate.js
Last active December 27, 2015 12:48
_.reverseTemplate() attempts to reverse engineer the original object used to generate a rendered underscore.js template output by comparing the output string to the template string.
/* Extend the underscore global object with the following method:
*
* https://gist.github.com/adamblank/7328089
*
* reverseTemplate attempts to reverse engineer the original object used to generate
* the rendered output by comparing the output string to the underscore template string.
*
* Paramaters
* - renderedOutput - the string that was generated from the template
* - template - the template string used to generate the compiled underscore template (not the compiled template function.)