Skip to content

Instantly share code, notes, and snippets.

@apburnes
Created January 28, 2014 06:14
Show Gist options
  • Select an option

  • Save apburnes/8663012 to your computer and use it in GitHub Desktop.

Select an option

Save apburnes/8663012 to your computer and use it in GitHub Desktop.
Gist from mistakes.io
var L = {};
L.fn = function() { return 'coolio' };
L.Util = {
extend: function(desc) {
var args = [].slice.call(arguments, 0);
args.map(function(item, ix, arr) {
desc[item] = args[ix];
});
return desc;
}
}
var coolio = L.Util.extend({
cool: function() {
return 'cool';
},
age: function(yr) {
return 2014 - yr;
}
})
L.fn()
coolio.cool();
coolio.age(1985);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment