Simple UTF-8 autocorrect for the most common Bahá’í terms
npm install bahai-autocorrect
npm install --save bahai-autocorrect
`$3
` Javascript
const BahaiAutocorrect = require('bahai-autocorrect');
let str = 'Haji Mirza Haydar-Ali'
let bahaiAutocorrect = new BahaiAutocorrect(str).correct()
let fixedStr = bahaiAutocorrect.toString()
`$3
By default, this library outputs underlined transliterations (ch, dh, gh, kh, sh, th, zh) as html with \ tags, e.g. "Síyáh-\Ch\ál".If you wish to use underscore notation, (e.g. "C_hál", you can run
BahaiAutocorrect.stripUnderlines()`. Note that in this case the underscores go between the letters, not before them.