Skip to content

yehuthi/unniqqud-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unniqqud

Remove niqqud (Hebrew vowel diacritics) and/or ta'amim (Hebrew cantillation diacritics; singular: ta'am) from text.

Installation

npm i unniqqud

Usage

See the API reference.

Examples

To just remove all diacritics from strings:

import unniqqud from "unniqqud";
unniqqud("שָּׁל֖וֹם") // = "שלום"

To selectively remove either niqqud or ta'amim:

import * as unniqqud from "unniqqud";
unniqqud.string("שָּׁל֖וֹם", unniqqud.niqqud) // = "של֖ום"
unniqqud.string("שָּׁל֖וֹם", unniqqud.taam) // = "שָּׁלוֹם"
unniqqud.string("שָּׁל֖וֹם", unniqqud.diacritic) // = "שלום"
// or just
unniqqud.string("שָּׁל֖וֹם") // = "שלום"

If you work with individual characters you can use niqqud, taam and diacritics as predicates as well:

import * as unniqqud from "unniqqud";
const qamatz = '\u05B8';
niqqud.niqqud(qamatz) // = true
niqqud.taam(qamatz) // = false
niqqud.diacritic(qamatz) // = true

All three predicates have a is*Code variant that checks a character-code number instead of a string. E.g.

import * as unniqqud from "unniqqud";
unniqqud.isNiqqud(0x05B8 /* i.e. Qamatz */) // = true

See Also

he2paleo: convert Hebrew script to Paleo-Hebrew / Phoenician script.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published