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
| /** | |
| * Promises Race | |
| */ | |
| (function () { | |
| var promises = [ | |
| Promise.resolve('1st'), | |
| Promise.resolve('2nd'), | |
| Promise.resolve('...'), | |
| Promise.resolve('n'), |
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
| /** | |
| * Promises Chaining | |
| */ | |
| (function () { | |
| var promises = [ | |
| () => Promise.resolve('1st'), | |
| () => Promise.resolve('2nd'), | |
| () => Promise.resolve('...'), | |
| () => Promise.resolve('n'), |
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
| /*global define, module */ | |
| /** | |
| * | |
| * Paginator object facotry | |
| * @param {[Array]} dv dataset | |
| * @param {[Integer]} ipp items per page | |
| * @return {[Object]} paginator object | |
| * | |
| * @example <caption>Example usage.</caption> | |
| * var p = paginator([0,1,2,3,4,5,6,7,8,9,0] , 3, function (currentPaginator) {console.log(currentPaginator.current())}); |
NewerOlder