Giter VIP home page Giter VIP logo

five's Introduction

five.js

A library to overcomplicate 5.

Build Status Code Climate Test Coverage

logo

DONATE: Give us five

Seriously, we'll be printing stickers and mailing to all contributors of the project. All remaining money will be passed on to a charity.

Usage

Require the module
var five = require('five');
In the browser
<script type="text/javascript" src="./five.js"></script>
Basic 5
five(); // 5
Addition
five() + five(); // 10
Multiplication
five() * five(); // 25
Division
five() / five(); // 1
Different sorts of 5
five.upHigh() // ⁵
five.downLow() // ₅
five.tooSlow() // 5, with a ~500 millisecond delay
five.roman() // V
five.morseCode() // .....
five.negative() // -5
five.loud() // FIVE
five.loud('piglatin') // IVEFAY
five.smooth() // S
five.mdFive() // 30056e1cab7a61d256fc8edd970d14f5
5 goes multilingual
five.arabic() // خمسة
five.azerbaijani() // beş
five.basque() // bost
five.belarusian // пяць
five.bosnian() // pet
five.bulgarian() // пет
five.catalan() // cinc
five.chinese() // 五
five.choctaw() // tahlapi
five.croatian() // pet
five.czech() // pět
five.dothraki() // mek
five.dovah() // hen
five.dutch() // vijf
five.elvish() // lempe
five.english() // Five
five.estonian() // viis
five.finnish() // viisi
five.french() // cinq
five.german() // fünf
five.greek() // πέντε
five.hebrew() // חמש
five.hindi() // पांच
five.hungarian() // öt
five.icelandic() // fimm
five.indonesian() // lima
five.irish() // cúig
five.italian() // cinque
five.japanese() // 五
five.kannada() // ಐದು
five.klingon() // vagh
five.korean() // 오
five.latin() // quinque
five.latvian() // pieci
five.lithuanian() // penki
five.mongolian() // таван
five.norwegian() // fem
five.persian() // پنج
five.piglatin() // ivefay
five.polish() // pięć
five.portuguese() // cinco
five.romanian() // cinci
five.russian() // пять
five.serbian() // pet
five.slovakian() // päť
five.slovenian() // pet
five.spanish() // cinco
five.swedish() // fem
five.tamil() // ஐந்து
five.telugu() // ఐదు
five.thai() // ห้า
five.turkish() // beş
five.ukrainian() // п’ять
five.welsh() // pump
Different radices
five.binary(); // 101
five.octal(); // 5
five.hex(); // 5
five.base(4); // 11
five.base(3); // 12
Assertion
five.isFive(10); // false
Filter, Map and Reduce
five.filter([5, true, 5]); // [5, 5]
five.map([1, 2, 3]); // [5, 5, 5]
five.reduce([1, 2, 3]); // 5
Novelty
five.fab(); // ['Juwan Howard','Ray Jackson','Jimmy King','Jalen Rose','Chris Webber']
five.jackson(); // ['Jackie','Tito','Jermaine','Marlon','Michael']
five.luniz(); // ‘I Got 5 on It’
Rotation
five.rot("five.js"); //"knaj.ox"
Asynchronous Usage
five.async(function(err, five) {
	// five === 5
});
Unicode
five.oclock(); // '🕔'

Development

The code

All of the logic & heavy lifting is achieved in one self-contained file:

./five.js
Tests
npm test

License

MIT

five's People

Contributors

jackdcrawford avatar phiat avatar jamiees2 avatar alexeyraspopov avatar lekoaf avatar thedumbterminal avatar yous avatar alexwilson avatar colinvh avatar gsinti avatar shackpank avatar atomic1fire avatar vikramsoni2 avatar raymond-h avatar tmarki avatar jjshoe avatar stevetauber avatar ormanli avatar bttmly avatar mantisimo avatar hermannbjorgvin avatar dinorosic avatar inxilpro avatar skyleravery avatar 4name avatar mathieudutour avatar nikeee avatar rakina avatar repejota avatar szymonstankiewicz avatar

Watchers

James Cloos avatar Nazır Doğan 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.