Add konyanyachiwaize

This commit is contained in:
ThinaticSystem 2021-07-19 02:37:11 +09:00
parent d04014f875
commit f6107f646e

View File

@ -2,6 +2,7 @@ export function nyaize(text: string): string {
return text return text
// ja-JP // ja-JP
.replace(/な/g, 'にゃ').replace(/ナ/g, 'ニャ').replace(/ナ/g, 'ニャ') .replace(/な/g, 'にゃ').replace(/ナ/g, 'ニャ').replace(/ナ/g, 'ニャ')
.replace(/(?<=こ)んにち[は|わ]/g, 'にゃにゃちわ').replace(/(?<=コ)ンニチ[ハ|ワ]/g, 'ニャニャチワ').replace(/(?<=コ)ンニチ[ハ|ワ]/g, 'ニャニャチワ')
// en-US // en-US
.replace(/(?<=n)a/gi, x => x === 'A' ? 'YA' : 'ya') .replace(/(?<=n)a/gi, x => x === 'A' ? 'YA' : 'ya')
.replace(/(?<=morn)ing/gi, x => x === 'ING' ? 'YAN' : 'yan') .replace(/(?<=morn)ing/gi, x => x === 'ING' ? 'YAN' : 'yan')