Last active
June 25, 2016 11:30
-
-
Save hawx1993/fe4ebd0c08246b0bd98b53c32c87186a 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
//bind | |
function bind(fn, ctx) { | |
return function (a) { | |
var l = arguments.length; | |
return l ? l > 1 ? fn.apply(ctx, arguments) : fn.call(ctx, a) : fn.call(ctx); | |
}; | |
} | |
//entend | |
function extend(destination, source) { | |
for (var property in source) destination[property] = source[property]; | |
return destination; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment