-
-
Save rcallahan/0748c6b40f590d43e096 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
sciencedirect = { | |
doi: munk.select("#ddDoi") | |
.bind(function(a) { return a.href}) | |
.bind(function(a) { return a.split("org/")[1]}), | |
attachments: [munk.select(".icon-pdf a").href()] | |
} | |
/* .bind(fn) composes fn with the previous returned value | |
fn is additionally called with the values of previous returned values as arguments | |
(munk.bind(function(){return 1}).bind(function(){return 2}).bind(function(a,b){return [a,b]}))() evaluates to [2,1] | |
.bind(function(a) {return a.href}) will be common enough to be sugared to .attr("href") or .href() | |
.select is sugar for .bind(function(a){return Sizzle(a)}) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment