spongebobify
Usage
First install it:
# npm npm install --save spongebobify # yarn (better) yarn add spongebobify
Alternatively, use it from the web with unpkg.
Then require and use it:
; console;// will print "a nOdE mOdUlE To eAsIlY SpOnGeBoBiFy TeXt" // you can also specify a param on case alternationconsole;// will print same as above console;// will print "A NoDe mOdUlE To eAsIlY SpOnGeBoBiGy tExT"
Development
# Build UMD and ESM modules yarn build # Run Mocha test-suite yarn test
FAQ
Q: Why does this exist?
A: WhY dOeS tHiS eXiSt?
Q: Why do you need type safe spongebobification?
A: Our 10s of users depend on us to deliver a reliable package that will never cause issues. Type checking allows us to deliver on that promise.
Q: Couldn't you just have a human test the code?
A: Clearly, we hold ourselves to higher standards than you hold yourself.
Q: Couldn't I just write this algorithm myself?
A: What would you rather do - write 5 lines of code or just type yarn add spongebobify
and get a package guaranteed to work after installing.
Q: Why is there a rollup config file?
A: Welcome to the future.
Credits
Algorithm and idea inspired by Irfaan Khalid's spongebobify-cmd project. His isn't as good though - there's no unit tests, it's not available on Maven and it's in Java.
License
MIT License.