node.js and browser shiva-sutras - शिवसूत्राणि
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
Makefile
Readme.md
component.json
npm-shrinkwrap.json
package.json
shiva.js

Readme.md

node.js and browser shiva-sutras - शिवसूत्राणि

Installation

With node.js:

$ npm install shiva-sutras

or with component

$ component install mbykov/shiva-sutras

Or as standalone version:

<script src="shiva.js"></script>

API

shiva agrument can be Panini keys or arbitrary devanagari symbols array:

var vowels = shiva('अच्').result;
var semivowels = shiva('यण्').result;
var consonants = shiva('हल्').result;
var nasals = shiva('ञम्').result; // ञ म ङ ण न म्
var voiced_asp = shiva('झष्').result;
var asps = var voiced_asp.concat(var unvoiced_asp).sort();
var voiced_unasp = shiva('जश्').result.sort();
var unvoiced_unasp = shiva('चय्').result.sort();

shiva can add or del Panini key or array:

var voiced_asp_h = shiva('झष्').add(['']).result;
var unvoiced_asp = shiva('खव्').del('चव्').result;

View more examples in test suite

Running node tests

$ make test

Running browser tests

open text/index.html

License

GNU GPL