1 Synopsis
2 Installation
3 Examples
3.1 Example 1
3.2 Example 2
3.3 Example 3
3.4 Example 4
3.4 Example 5
4 Why DeStupidify
5 Contributions
6 License
Have you ever come across a really stupid function that returns "yes" or "no" instead of a useful value like true or false. Who does that?!?! In a recent contribution to DeBunk, a highly performant, state-of-the-art 3 and/or 17 verifier, somebody created some functions that return really stupid values.
Luckily with DeStupidify, you don't have to worry about stupid return values anymore! Simply run your functions through this life-changing module and get significantly less stupid values to work with!
You can install Destupidify with npm:
npm install destupidify
Here are some examples of how to use DeStupidify.
var destupidify = require('destupidify');
destupidify.destupidifyAffirmativeVal('YEAH'); //true
var destupidify = require('destupidify');
destupidify.destupidifyAffirmativeVal('I guess'); //true
var destupidify = require('destupidify');
destupidify.destupidifyNegativeVal('nope'); //false
var debunk = require('debunk');
var destupidify = require('destupidify');
destupidify.destupidifyNegativeVal(debunk.doesItEqualThree(1+9)); //false
// this is deprecated, debunk>=1.2 now proudly uses DeStupidify!
var destupidify = require('destupidify');
destupidify.isThisShitStupid('yep'); //true
destupidify.isThisShitStupid('no fucking way dude'); //true
destupidify.isThisShitStupid(Math.PI); //false
Some functions return really stupid values.
DeStupidify is open source. Contribute today at http://www.github.com/ekopelevich/destupidify.
ISC License
©2016 Elana Kopelevich