Last active
August 29, 2015 14:01
-
-
Save JakeSidSmith/98cec5988c64c16153ad to your computer and use it in GitHub Desktop.
o_0.js - Useless functions
This file contains 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 o_0 = {}; | |
o_0.isOdd = function(thing, normal) { | |
return thing !== normal; | |
}; | |
o_0.isANinja = function (element) { | |
return element.style.visibility === 'hidden'; | |
}; | |
o_0.isNot = function (thing) { | |
return thing === 'not'; | |
}; | |
o_0.whatIsThis = function (thing) { | |
return 'I don\'t know'; | |
}; | |
o_0.isMagical = function (thing) { | |
thing *= 0; | |
if (!thing) { | |
return true; | |
} | |
return false; | |
}; | |
o_0.isOver9000 = function (value) { | |
return value > 9000; | |
}; | |
o_0.isNegative = function (thing) { | |
var terms = ['sad', 'bad', 'angry', 'negative', 'emo']; | |
if (thing.length) { | |
for (var i = 0; i < terms.length; i += 1) { | |
if (thing.indexOf(terms[i]) >= 0) { | |
return true; | |
} | |
} | |
return false; | |
} | |
if (thing < 0) { | |
return true; | |
} | |
return false; | |
}; | |
o_0.undefined = function () { | |
return undefined; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment