1
0
mirror of https://github.com/uetchy/namae.git synced 2025-08-20 18:08:11 +09:00

fix: new words

This commit is contained in:
2020-02-12 12:19:12 +09:00
parent b953d4a07a
commit 679d786138
3 changed files with 126 additions and 110 deletions

View File

@@ -26,6 +26,12 @@ export function germanify(word: string): string {
return word.replace('c', 'k').replace('C', 'K');
}
export function njoin(lhs: string, rhs: string): string {
return lhs + rhs.replace(new RegExp(`^${lhs[-1]}`, 'i'), '');
export function njoin(
lhs: string,
rhs: string,
{elision = true}: {elision?: boolean} = {},
): string {
return elision
? lhs + rhs.replace(new RegExp(`^${lhs[-1]}`, 'i'), '')
: lhs + rhs;
}

View File

@@ -1380,7 +1380,6 @@ export const zones = [
'teva',
'tf',
'tg',
'th',
'thai',
'thd',
'theater',