Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/isaacdarcilla/filipino-script-translator

๐Ÿ†Ž Tagalog to Baybayin, Buhid, Hanunoo and Tagbanwa translator โ€” TypeScript
https://github.com/isaacdarcilla/filipino-script-translator

baybayin buhid hanunoo node npm package scripts tagalog tagbanwa translate translator typescript

Last synced: about 2 months ago
JSON representation

๐Ÿ†Ž Tagalog to Baybayin, Buhid, Hanunoo and Tagbanwa translator โ€” TypeScript

Awesome Lists containing this project

README

        

## filipino-script-translator

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

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
[![npm version](https://badge.fury.io/js/filipino-script-translator.svg)](https://badge.fury.io/js/filipino-script-translator)
[![codecov](https://codecov.io/gh/isaacdarcilla/filipino-script-translator/graph/badge.svg?token=GYELibxicI)](https://codecov.io/gh/isaacdarcilla/filipino-script-translator)

### Demonstration

> Demo deployed in Vercel

[![Deploy with Vercel](https://vercel.com/button)](https://ohtranslate.vercel.app/)

### Installation

```bash
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`:

```ts
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:

```js
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](https://opensource.org/licenses/MIT).