five-plus
A library to overcomplicate 5
. Better.
Idiomatic CoffeeScript rewrite of the legendary five.js by @jackdcrawford.
Usage
Require the module
Five = require 'five-plus'
In the browser
Basic 5
Five # 5
Addition
Five + Five # 10
Multiplication
Five * Five # 25 # Note: a more idiomatic way to do this in CoffeeScript Five ** 2 # 25
Division
Five / Five # 1
Different sorts of 5
five = fiveupHigh # ⁵ fivedownLow # ₅ fivetooSlow # 5, with a ~500 millisecond delay fiveroman # V fivemorseCode # di-di-di-di-dit
5 goes multilingual
five = fivearabic # خمسة fivechoctaw # tahlapi fivecroatian # pet fiveczech # pět fiveenglish # Five fivefinnish # viisi fivefrench # cinq fivegerman # fünf fiveirish # cúig fiveitalian # cinque fivemongolian # таван fivepiglatin # ivefay fivepolish # pięć fiveslovenian # pet fivespanish # cinco fiveswedish # fem fivethai # ห้า
Different radices
five = fivebinary # 101 fiveoctal # 5
Map and Reduce
fivemap 123# [5, 5, 5] fivereduce 123# 5
Development
The code
All of the logic & heavy lifting is achieved in one self-contained file:
./lib/five.js
Compiling
Compilation is done using cake
under the hood with an npm-prepublish
script:
npm install
Tests
npm test