Skip to content

Instantly share code, notes, and snippets.

@puffnfresh
Created July 16, 2012 04:55
Show Gist options
  • Save puffnfresh/3120640 to your computer and use it in GitHub Desktop.
Save puffnfresh/3120640 to your computer and use it in GitHub Desktop.
function extend(o, e) {
var n = {}, i;
for(i in o) {
n[i] = o[i];
}
for(i in e) {
n[i] = e[i];
}
return n;
}
function singletonObject(k, v) {
var o = {};
o[k] = v;
return o;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment