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 select(selector) { | |
| var elements = [document], | |
| queryStart = 0, | |
| callQueue = [], | |
| temp, | |
| i; | |
| for (i = 0; i < selector.length; i++) { | |
| switch (selector[i]) { | |
| case '#': |
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
| define( | |
| 'console', | |
| function() { | |
| var QUEUED_API = [ | |
| 'count', | |
| 'dir', | |
| 'error', | |
| 'group', | |
| 'groupCollapsed', | |
| 'groupEnd', |
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
| define( | |
| 'Heap', | |
| function() { | |
| function Heap(array, fn) { | |
| var instance = Object.create(Heap.prototype); | |
| instance._sortFn = typeof fn === 'function' ? fn : Heap.defaultSort; | |
| instance._store = Array.isArray(array) ? array : []; | |
| Heap.heapify(instance._store, instance._sortFn); |
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
| define( | |
| 'Eventable', | |
| function() { | |
| function extend(dest, src) { | |
| for (var key in src) { | |
| if (src.hasOwnProperty(key)) { | |
| dest[key] = src[key]; | |
| } | |
| } |
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
| define( | |
| 'dateFormat', | |
| function() { | |
| var DAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Firday', 'Saturday'], | |
| MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], | |
| MONTHS_ABBREV = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'], | |
| datePrototype = Date.prototype, | |
| formatCharacters = { | |
| // DAY | |
| // Numeric representation (with leading zero) |
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
| define( | |
| 'EntityToUnicode', | |
| function() { | |
| var el = document.createElement('p'); | |
| /** | |
| * HTML Entities to unicode text | |
| * @param {string} str - String which contains HTML entities to decode | |
| * @returns {string} A string of the equivalent unicode text | |
| */ |
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
| /** | |
| * Succesively filter an array until the minimum result set is found | |
| * @param {array} array - Array to be filtered | |
| * @param {function...} fn1..fnN - Any number of filter functions | |
| * @returns {array} The smallest non-empty array given the set of filters | |
| */ | |
| function successiveFilter(array /* ... */) { | |
| var prevArray, | |
| fnArray = Array.prototype.slice.call(arguments, 1); |
OlderNewer