Last active
August 29, 2015 14:24
-
-
Save paveltimofeev/d6bdda98e37ffed9be9e to your computer and use it in GitHub Desktop.
JavaScript hooks, patterns, tricks
This file contains hidden or 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 done(){ | |
console.log('> Done'); | |
console.log( arguments ); | |
} | |
function request( context, url, _done) { _done( context, url, _done ); } | |
var wrappedrequest = request.bind( null, 'doc._id' ); | |
console.log('\r\n\r\n'); | |
wrappedrequest( 'goo.gl', done ); | |
request( null, 'goo.gl', done); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment