0.4.0 • Published 11 years ago
five-coffee v0.4.0
five.js
A library to overcomplicate 5
, now in CoffeeScript
Usage
Require the module
five = require('five')
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() # di-di-di-di-dit
5 goes multilingual
five.arabic() # خمسة
five.choctaw() # tahlapi
five.croatian() # pet
five.czech() # pět
five.english() # Five
five.french() # cinq
five.german() # fünf
five.irish() # cúig
five.mongolian() # таван
five.piglatin() # ivefay
five.polish() # pięć
five.romanian() # cinci
five.slovenian() # pet
five.swedish() # fem
five.thai() # ห้า
Different radices
five.binary(); # 101
five.octal(); # 5
Map and Reduce
five.map([1, 2, 3]); # [5, 5, 5]
five.reduce([1, 2, 3]); # 5
Development
The code
All of the logic & heavy lifting is achieved in one self-contained file:
./five.coffee
Tests
npm test
0.4.0
11 years ago