test
This commit is contained in:
parent
5bc38889b8
commit
cb0c2cbb14
|
@ -8,9 +8,9 @@ export function nyaize(text: string): string {
|
||||||
// ja-JP
|
// ja-JP
|
||||||
.replaceAll('な', 'にゃ').replaceAll('ナ', 'ニャ').replaceAll('ナ', 'ニャ')
|
.replaceAll('な', 'にゃ').replaceAll('ナ', 'ニャ').replaceAll('ナ', 'ニャ')
|
||||||
// en-US
|
// en-US
|
||||||
.replace(/(?<=n)a/gi, x => x === 'A' ? 'YA' : 'ya')
|
.replace(/(n)a/gi, (match, p1) => p1 === 'A' ? 'YA' : 'ya')
|
||||||
.replace(/(?<=morn)ing/gi, x => x === 'ING' ? 'YAN' : 'yan')
|
.replace(/(morn)ing/gi, (match, p1) => p1 === 'ING' ? 'YAN' : 'yan')
|
||||||
.replace(/(?<=every)one/gi, x => x === 'ONE' ? 'NYAN' : 'nyan')
|
.replace(/(every)one/gi, (match, p1) => p1 === 'ONE' ? 'NYAN' : 'nyan')
|
||||||
// ko-KR
|
// ko-KR
|
||||||
.replace(/[나-낳]/g, match => String.fromCharCode(
|
.replace(/[나-낳]/g, match => String.fromCharCode(
|
||||||
match.charCodeAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0),
|
match.charCodeAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0),
|
||||||
|
|
Loading…
Reference in New Issue