Banana.js
A banana library to end all banana libraries.
Set up
Installing
npm install banana-js
Importing
Module:
var banana = ;
Browser:
Usage
Banana currently supports 34 languages, including:
Arabic, Azerbaijani, Basque, Belarusian, Burmese, Catalan, Cebuano, Cantonese (and Mandarin), Czech, Dutch, Esperanto, English, Estonian, Filipino, Finnish, French, Georgian, German, Greek, Gujarati, Haitian Creol, Hausa, Hebrew, Hindi, Hungarian, Icelandic, Igbo, Indonesian, Japanese, Kannada, Kazakh, Khmer, and Korean!
; // موز; // banana; // 바나나
Ever needed the ingredients or directions to make banana nut muffins, pudding, or even smoothies?
// banana.muffin("ingredients" | "directions");// banana.pudding("ingredients" | "directions"); banana;// ingredients: // [ "1 banana", "1/2 to 1 cup chilled milk", // "1 tablespoon honey (optional)", // "5 to 8 ice cubs (optional)" ]// directions: // [ "0. Combine all of the ingredients in a blender and blend on medium-high speed until desired thickness.", // "Tip: Combine ice cubes and milk first, then the other ingredients for a more even blend." ]
Unsure about if something is, in fact, a banana? Maybe it's in a language you don't understand!
var unsureBanana = "바나나";banana; // falsebanana; // true
If you're ever feeling insignificant, check to see if something is longer than the word banana in a specific language!
var longer = "much larger";var shorter = "short";banana; // falsebanana; // true
Feeling down? Need some banana facts to pick up your spirits? Generate some random ones!
banana; // 'Bananas are low in calories and have no fat, no sodium, and no cholesterol. They contain vitamin C, potassium, fiber, and vitamin B6.'banana; // 'Wrapping banana stems tightly in cling wrap will make them last three to five days longer.'banana; // 'Bananas are technically berries.'
Other
banana; // 🍌banana; // -... .- -. .- -. .-banana; // YmFuYW5hbanana; // #ffe135bananacolor; // yellowbanana; // no.
Development
Like a real banana, all of the code is contained in one file:
./banana.js
Tests are in test.js
and can be run using:
npm run test OR npm test
License
MIT