This is now an actual repo:
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
| // // // // // // // // // // // // // // // // // // // // // | |
| // works as a generic! | |
| Array.sg_asyncEach([1, 2, 3], | |
| function(value, key, array) { | |
| console.log(value, key, array) | |
| return "eachFn result " + value | |
| }, | |
| function(err, result) { | |
| console.log('sg_asyncEach callback', err && "Error!" || "Success!", result) |
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
| /* | |
| * matchMedia() polyfill - test whether a CSS media type or media query applies | |
| * primary author: Scott Jehl | |
| * Copyright (c) 2010 Filament Group, Inc | |
| * MIT license | |
| * adapted by Paul Irish to use the matchMedia API | |
| * http://dev.w3.org/csswg/cssom-view/#dom-window-matchmedia | |
| * which webkit now supports: http://trac.webkit.org/changeset/72552 | |
| * | |
| * Doesn't implement media.type as there's no way for crossbrowser property |
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
| /** | |
| * Provides requestAnimationFrame in a cross browser way. | |
| * @author paulirish / http://paulirish.com/ | |
| */ | |
| if ( !window.requestAnimationFrame ) { | |
| window.requestAnimationFrame = ( function() { | |
| return window.webkitRequestAnimationFrame || |
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
| function r(f){/in/(document.readyState)?setTimeout(r,9,f):f()} |
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
| function r(f){setTimeout(/in/(document.readyState)?r:f,9,f)} |
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
| /* | |
| * Containing floats in a consistent manner | |
| * By Jonathan Neal and Nicolas Gallagher | |
| */ | |
| /* | |
| * New block formatting context method | |
| * IE 6+, Firefox 2+, Safari 4+, Opera 9+, Chrome | |
| */ |
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
| /*! | |
| * Small Walker - v0.1.1 - 5/5/2011 | |
| * http://benalman.com/ | |
| * | |
| * Copyright (c) 2011 "Cowboy" Ben Alman | |
| * Dual licensed under the MIT and GPL licenses. | |
| * http://benalman.com/about/license/ | |
| */ | |
| // Walk the DOM, depth-first (HTML order). Inside the callback, `this` is the |
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
| i=0;do console.log(++i%15?i%3?i%5?i:'buzz':'fizz':'fizzbuzz');while(i<100) |
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
| function escapeHTML(s,r){r='replace';return s[r](/&/g,'&')[r](/>/g,'>')[r](/</g,'<')} |