Pure JS birmanization