Skip to content

Instantly share code, notes, and snippets.

@kborchers
Created Jan 21, 2013
Embed
What would you like to do?
[ "previous", "next" ].forEach( function( element ) {
data[ element ] = (function( pipe, parameters, options ) {
return function( callbacks ) {
options.paging = true;
options.offsetValue = options.limitValue = undefined;
options.query = parameters;
options.success = callbacks && callbacks.success ? callbacks.success : options.success;
options.error = callbacks && callbacks.error ? callbacks.error : options.error;
return pipe.read( options );
};
})( that, links[ pageConfig[ element + "Identifier" ] ], options );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment