Skip to content

Instantly share code, notes, and snippets.

@davemo
Created September 30, 2013 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davemo/6768367 to your computer and use it in GitHub Desktop.
Save davemo/6768367 to your computer and use it in GitHub Desktop.
a little extension to extend.js, to alias as "def" for coffeescript fun
root = this
root.def = _(extend).wrap (ex, args...) ->
[namespace, target] = args
unless typeof(target) is "object"
target.prototype.namespacePath = namespace
ex.apply(this, args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment