GithubHelp home page GithubHelp logo

auderer / banana Goto Github PK

View Code? Open in Web Editor NEW

This project forked from judah-caruso/banana

1.0 0.0 0.0 51 KB

When your code needs some potassium.

Home Page: https://www.npmjs.com/package/banana-js

JavaScript 100.00%

banana's Introduction

Banana.js

A banana library to end all banana libraries.

Maintainability Test Coverage

Set up

Installing

npm install banana-js

Importing

Module:

var banana = require("banana-js");

Browser:

<script type="text/javascript" src="./banana.js"></script>

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, Korean and Russian!

banana("arabic"); 	// موز
banana("english"); 	// banana
banana("korean");	// 바나나

Ever needed the ingredients or directions to make banana nut muffins, pudding, or even smoothies?

// banana.muffin("ingredients" | "directions");
// banana.pudding("ingredients" | "directions");

banana.smoothie("ingredients" | "directions");
// 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.is(unsureBanana, "english");	// false
banana.is(unsureBanana, "korean");	// 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.isLongerThan(longer, "english");	 // false
banana.isLongerThan(shorter, "english"); // true

Feeling down? Need some banana facts to pick up your spirits? Generate some random ones!

banana.fact(); // 'Bananas are low in calories and have no fat, no sodium, and no cholesterol. They contain vitamin C, potassium, fiber, and vitamin B6.'
banana.fact(); // 'Wrapping banana stems tightly in cling wrap will make them last three to five days longer.'
banana.fact(); // 'Bananas are technically berries.'

Other

banana.peel();		// 🍌
banana.morse();		// -... .- -. .- -. .-
banana.base64();	// YmFuYW5h
banana.hex();		// #ffe135
banana.color();		// yellow
banana.phone();		// 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

banana's People

Contributors

judah-caruso avatar neo97online avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.