0.0.6 • Published 2 years ago
filipino-script-translator v0.0.6
filipino-script-translator
Translate given text into Baybayin, Buhid, Hanunoo, or Tagbanwa scripts.
Demonstration
Installation
npm install filipino-script-translatorUsage
Import the translate() and the enum from the package.
Change the script parameter into one of the enums, the default is BAYBAYIN:
import { Script, translate } from 'filipino-script-translator';
const result = translate('maganda', Script.BAYBAYIN);
// Output: ᜋᜄᜈ᜔ᜇ
const result = translate('maganda', Script.TAGBANWA);
// Output: ᝫᝤᝧ
const result = translate('maganda', Script.HANUNOO);
// Output: ᜫᜤᜨ᜴ᜧ
const result = translate('maganda', Script.BUHID);
// Output: ᝋᝄnᝇor directly use the translator methods base on the script you want:
import { toBaybayin, toBuhid, toHanunoo, toTagbanwa } from 'filipino-script-translator';
const result = toBaybayin('maganda');
// Output: ᜋᜄᜈ᜔ᜇ
const result = toTagbanwa('maganda');
// Output: ᝫᝤᝧ
const result = toHanunoo('maganda');
// Output: ᜫᜤᜨ᜴ᜧ
const result = toBuhid('maganda');
// Output: ᝋᝄnᝇPackage
The package is available in npmjs.com at filipino-script-translator.
Testing
npm run testLinting
npm run lintBuilding
npm run buildLicense
This package is open-sourced software licensed under the MIT license.