Skip to content

karmapa/sortSyllable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#sortSyllable

sort tibetan syllables

Build Status

Useage

var sortSyllable = require('./sortsyllable.js');
sortSyllable('tibetan str');

sortSyllable fetches tibetan syllables acrroding to symbols. It counts the number of the syllables. Then it returns the syllables and syllable counts from high to low.

sortSyllable('དགག་དགག་དབྱེ་དབྱར་དང་ཀོ་ལྤགས་གཞི།');
/*output will be
[ [ 'དགག' ,2 ],
  [ 'དབྱེ', 1 ],
  [ 'དབྱར', 1 ],
  [ 'དང', 1 ],
  [ 'ཀོ', 1 ],
  [ 'ལྤགས', 1 ],
  [ 'གཞི', 1 ] ]
*/

##Incorrect I/O Input must be tibetan string, others return an empty array.

sortSyllable()           //[]
sortSyllable('abc');     //[]
sortSyllable(123);       //[]
sortSyllable([array]);   //[]
sortSyllable({object});  //[]

About

sort tibetan sylables

Resources

Stars

Watchers

Forks

Packages

No packages published