node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org ยป

iching

I-Ching birth/core/end hexagram calculation library

This is a static c/c++ library for calculation birth/core/end hexagram numbers.

Build Status

Node.JS

This library works with Node.js 0.8.x and 0.10.x.

Maybe it works with the 0.6. If it so, please, let me know.

You can install the library via npm:

npm install iching

Prerequisites

You should have node-gyp and c++ compiler (gcc or clang) installed.

References

Read this Livejournal post (in russian) for the explanation (about I-Ching).

Examples

View tests/test.c or tests/test.cc for the usage example.

Node.JS

Sample test.js:

var iching=require('iching');
console.log(iching.getHexagrams(1980,11,24,1));

Should print out:

{ birth: 23, core: 2, end: 2, mline: 6 }