Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yehuthi/he2paleo
JavaScript library to convert Hebrew script to Paleo-Hebrew / Phoenician script.
https://github.com/yehuthi/he2paleo
alphabet finiki hebrew history letters paleo paleo-hebrew phoenician script tokens
Last synced: 28 days ago
JSON representation
JavaScript library to convert Hebrew script to Paleo-Hebrew / Phoenician script.
- Host: GitHub
- URL: https://github.com/yehuthi/he2paleo
- Owner: yehuthi
- Created: 2021-11-07T17:07:21.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-06T02:20:24.000Z (over 2 years ago)
- Last Synced: 2024-12-06T13:49:13.652Z (2 months ago)
- Topics: alphabet, finiki, hebrew, history, letters, paleo, paleo-hebrew, phoenician, script, tokens
- Language: TypeScript
- Homepage:
- Size: 41 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# he2paleo [](https://www.npmjs.com/package/he2paleo)
Convert Hebrew script to Paleo-Hebrew / Phoenician script.
[Demo](https://yehuthi.github.io/tatqan/)
## Installation
```shell
npm i he2paleo
```## Usage
If you just need to convert strings, you can just use the default import:
```typescript
import he2paleo from 'he2paleo';he2paleo("שלום, עולם!") // => "𐤔𐤋𐤅𐤌, 𐤏𐤅𐤋𐤌!"
```If you want more control:
```typescript
import * as he2paleo from 'he2paleo';he2paleo.char("א") // => "𐤀"
he2paleo.charCode("א".charCodeAt(0)) // => "𐤀"
he2paleo.charCode(0) // => undefined
he2paleo.char("k") // => undefined
he2paleo.string("שלום, עולם!") // => "𐤔𐤋𐤅𐤌, 𐤏𐤅𐤋𐤌!"// When you know the characters are always Hebrew, you can use the unchecked versions:
he2paleo.charUnchecked("א") // => "𐤀"
he2paleo.charCodeUnchecked("א".charCodeAt(0)) // => "𐤀"
```Be careful if you want to use unchecked versions when mapping strings, because it's easy to not notice some illegal characters such as spaces, punctuation, digits etc. that might be present. It's so easy to shoot yourself in the foot that this is why a `stringUnchecked` is not provided (at least for the time being).