fillopts
Partially applied functions are really cool. However, partial application doesn't work too well for functions that use objects to emulate named arguments. Since that's such a common idiom in JS, we made this library to handle it.
var xhr = fillopts = ; // Or use the global or AMD in the browser. // Create a new function with some options prefilled.var myXHR = ; // Call our function with some more options.; // The above is equivalent to this:;
or use chaining:
var myXHR = ; ;
You can also fill opts that aren't in the first position by passing an index. All of the following are equivalent:
;;;