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
var PadText = (function () { | |
"use strict"; | |
var func; | |
func = function (text, prefix, finalLength) { | |
return (new Array(finalLength).join(prefix.charAt(0)) + text).slice(-finalLength); | |
}; | |
return func; |
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
var IsLeapYear = (function () { | |
"use strict"; | |
var func; | |
func = function (year) { | |
return (year % 400) ? ((year % 100) ? ((year % 4) ? false : true) : false) : true; | |
}; | |
return func; |
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
var IsInViewport = (function () { | |
"use strict"; | |
var func; | |
func = function (el, par) { | |
var ret, elRect, parRect; | |
elRect = el.getBoundingClientRect(); | |
if (par) { | |
parRect = par.getBoundingClientRect(); |
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
var RemoveDuplicates = (function () { | |
"use strict"; | |
var inPlace, getCopy; | |
inPlace = function (arr) { | |
var i, j, cur, found; | |
for (i = arr.length - 1; i >= 0; i--) { | |
cur = arr[i]; | |
found = false; |
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
var Format = (function () { | |
"use strict"; | |
var toCamelCase, toHyphenated; | |
toCamelCase = (function () { | |
var re, ret; | |
re = /-([a-z])/g; | |
ret = function (str) { | |
str = str.replace(re, function (match, lower) { |
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
var Each = (function () { | |
"use strict"; | |
var O, toString, is, ret; | |
O = {}; | |
toString = O.toString; | |
is = function (o, t) { | |
return (toString.call(o) === "[object " + t + "]"); | |
}; |
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
var Slice = (function () { | |
"use strict"; | |
var func; | |
func = function (arr, start, howMany) { | |
var stop, newArr, i, j, cur; | |
start = +start || 0; | |
howMany = +howMany || Infinity; |
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
var Classes = (function () { | |
"use strict"; | |
var E, trim, containsClass, addClass, removeClass, toggleClass; | |
E = document.createElement("div"); | |
if (E.classList && !E.hasOwnProperty("classList")) { | |
containsClass = function (el, cls) { | |
return el.classList.contains(cls); |
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
var Subscriber = (function () { | |
"use strict"; | |
var F, allSubscribers, SubClass, PublicClass, handleOn, slice, ret; | |
F = function () { return undefined; }; | |
allSubscribers = {}; | |
SubClass = function (opts) { | |
var me, events; |
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 isOdd(num) { | |
return !!(num & 1); | |
} |