diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-20 07:48:31 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-20 07:48:31 +0900 |
| commit | 6ff5bfd2bc6c286c689fee9577b9e9036112e689 (patch) | |
| tree | b27281af024095844562c7f5e3d5792534c75f4f /packages/backend/src/misc | |
| parent | fix(backend): 管理者権限のロールを持っていても一部のAPIが... (diff) | |
| download | misskey-6ff5bfd2bc6c286c689fee9577b9e9036112e689.tar.gz misskey-6ff5bfd2bc6c286c689fee9577b9e9036112e689.tar.bz2 misskey-6ff5bfd2bc6c286c689fee9577b9e9036112e689.zip | |
clean up
Diffstat (limited to 'packages/backend/src/misc')
| -rw-r--r-- | packages/backend/src/misc/nyaize.ts | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/packages/backend/src/misc/nyaize.ts b/packages/backend/src/misc/nyaize.ts deleted file mode 100644 index 0ac77e1006..0000000000 --- a/packages/backend/src/misc/nyaize.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * SPDX-FileCopyrightText: syuilo and other misskey contributors - * SPDX-License-Identifier: AGPL-3.0-only - */ - -export function nyaize(text: string): string { - return text - // ja-JP - .replaceAll('な', 'にゃ').replaceAll('ナ', 'ニャ').replaceAll('ナ', 'ニャ') - // en-US - .replace(/(?<=n)a/gi, x => x === 'A' ? 'YA' : 'ya') - .replace(/(?<=morn)ing/gi, x => x === 'ING' ? 'YAN' : 'yan') - .replace(/(?<=every)one/gi, x => x === 'ONE' ? 'NYAN' : 'nyan') - // ko-KR - .replace(/[나-낳]/g, match => String.fromCharCode( - match.charCodeAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0), - )) - .replace(/(다$)|(다(?=\.))|(다(?= ))|(다(?=!))|(다(?=\?))/gm, '다냥') - .replace(/(야(?=\?))|(야$)|(야(?= ))/gm, '냥'); -} |