Created
October 23, 2014 20:27
-
-
Save michalkowol/f6ca3c360f703c370754 to your computer and use it in GitHub Desktop.
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
function _extend(object, source) { | |
for (var key in source) { | |
if (source.hasOwnProperty(key)) { | |
object[key] = source[key]; | |
} | |
} | |
return object; | |
} | |
function _with() { | |
var self = {}; | |
var args = Array.prototype.slice.call(arguments); | |
for (var i = 0; i < args.length; i++) { | |
args[i](self); | |
} | |
self.super = _extend({}, self); | |
return self; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment