Skip to content

Instantly share code, notes, and snippets.

View jmgunn87's full-sized avatar

James Marshall-Gunn jmgunn87

View GitHub Profile
@jmgunn87
jmgunn87 / format.js
Last active December 16, 2015 02:09
printf for js
register = {
"beep": "boop"
};
function format(str) {
var argi = 0;
var args = arguments;
return str.replace(/(%\w{1}$)|(<.+>)/g,
function (match, specifier, interpol) {
if (specifier) {
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007