isaacdarcilla / filipino-script-translator

πŸ†Ž Tagalog to Baybayin, Buhid, Hanunoo and Tagbanwa translator β€” TypeScript

Home Page:https://www.npmjs.com/package/filipino-script-translator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

filipino-script-translator

Translate given text into Baybayin, Buhid, Hanunoo, or Tagbanwa scripts.

js-standard-style npm version codecov

Demonstration

Demo deployed in Vercel

Deploy with Vercel

Installation

npm install filipino-script-translator

Usage

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ᝇ

Testing

npm run test

Linting

npm run lint

Building

npm run build

License

This package is open-sourced software licensed under the MIT license.

About

πŸ†Ž Tagalog to Baybayin, Buhid, Hanunoo and Tagbanwa translator β€” TypeScript

https://www.npmjs.com/package/filipino-script-translator

License:MIT License


Languages

Language:TypeScript 98.2%Language:Shell 1.8%