Skip to content

Instantly share code, notes, and snippets.

@JakeSidSmith
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JakeSidSmith/98cec5988c64c16153ad to your computer and use it in GitHub Desktop.
Save JakeSidSmith/98cec5988c64c16153ad to your computer and use it in GitHub Desktop.
o_0.js - Useless functions
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