Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/isaacdarcilla/filipino-script-translator
- Owner: isaacdarcilla
- License: mit
- Created: 2023-09-19T05:59:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-01T23:40:54.000Z (6 months ago)
- Last Synced: 2024-09-28T03:57:12.746Z (3 months ago)
- Topics: baybayin, buhid, hanunoo, node, npm, package, scripts, tagalog, tagbanwa, translate, translator, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/filipino-script-translator
- Size: 849 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```
### UsageImport 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).