Created
September 30, 2013 18:56
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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