GitXplorerGitXplorer
e

twlv

public
1 stars
0 forks
1 issues

Commits

List of commits on branch master.
Unverified
5d6fc75a546e3c3887537ccb218e75397d85c1a1

fix 十二天, 十二直

ee-jigsaw committed 10 years ago
Unverified
c9624dc27cedc71f926eda45f7ce0328370f81a1

add earth branch, chromatic scale length check

ee-jigsaw committed 10 years ago
Unverified
1936dd215eda1beea5de951d253b288cd474c468

fix astrological sign

ee-jigsaw committed 10 years ago
Unverified
8746df021ed3806cd2a2b589c6dced31e6a2e087

fix zodiac

ee-jigsaw committed 10 years ago
Unverified
90841a6e49bf05ba56ddf03eb1c78a603f905cda

add wercker badge

ee-jigsaw committed 10 years ago
Unverified
92dcac3fea68ca1f3a301c9346bb63363e50f70e

add wercker

ee-jigsaw committed 10 years ago

README

The README file for this repository.

twelve.js

A library to overcomplicate 12. Inspired by https://github.com/jackdcrawford/five .

wercker status NPM

Installation

% npm install twlv

Usage

Require the module

twelve = require 'twlv'

In the browser

<script type="text/javascript" src="https://raw.githubusercontent.com/e-jigsaw/twlv/master/./lib/twlv.js" />

Basic 12

twelve() # 12

Addition

twelve() + twelve() # 24

Multiplication

twelve() * twelve() # 144

Division

twelve() / twelve() # 1

Before and After

twelve.before() # 11
twelve.after()  # 13

English

twelve.english() # Twelve

Different sorts of 12

twelve.upHigh()  # ¹²
twelve.downLow() # ₁₂
twelve.roman()   # XII

Different radices

twelve.binary()     # 1100
twelve.octal()      # 14
twelve.duodecimal() # 10
twelve.hex()        # c

Summation and Factorial

twelve.summation() # 78
twelve.factorial() # 479001600

12th something

twelve.month()      # 1 year
twelve.element()    # Mg
twelve.asteroid()   # Victoria
twelve.tarot()      # The Hanged Man
twelve.tarot.user() # J Guile
twelve.hexagram()   # 天地否
twelve.quran.sura() # يوسف

Twelve something

twelve.zodiac()           # ['Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo', 'Scorpio', 'Sagittarius', 'Capricorn', 'Aquarius', 'Pisces']
twelve.astrologicalSign() # ['Mars', 'Venus', 'Mercury', 'Moon', 'Sun', 'Mercury', 'Pluto', 'Jupiter', 'Saturn', 'Uranus', 'Neptune']
twelve.earthlyBranches()  # ['子', '丑', '寅', '卯', '辰', '巳', '午', '未', '申', '酉', '戌', '亥']
twelve.chromaticScale()   # ['C', 'C♯', 'D', 'E♭', 'E', 'F', 'F♯', 'G', 'A♭', 'A', 'B♭', 'B']
twelve['天']()            # ['帝釈天', '火天', '焔魔天', '羅刹天', '水天', '風天', '毘沙門天', '伊舎那天', '梵天', '地天', '日天', '月天']
twelve['直']()            # ['建', '除', '満', '平', '定', '執', '破', '危', '成', '納', '開', '閉']
twelve.nidanas()          # ['無明', '行', '識', '名色', '六処', '触', '受', '愛', '取', '有', '生', '老死']
twelve.apostles()         # ['Andrew', 'Bartholomew', 'James of Alphaeus', 'James of Zebedee', 'John', 'Judas Iscariot', 'Matthew', 'Matthias', 'Philip', 'Simon Oeter', 'Simon the Zealot', 'Thomas']
twelve.heavenlyGenerals() # ['金毘羅', '伐折羅', '迷企羅', '安底羅', '頞儞羅', '珊底羅', '因達羅', '波夷羅', '摩虎羅', '真達羅', '招杜羅', '毘羯羅']
twelve.olympians()        # ['Zeus', 'Hera', 'Poseidon', 'Demeter', 'Athena', 'Apollo', 'Artemis', 'Ares', 'Aphrodite', 'Hephaestus', 'Hermes', 'Hestia']

Development

% npm start # build
% npm test  # test

License

MIT