mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
440 B
TypeScript
19 lines
440 B
TypeScript
import Miao from 'miao-lang';
|
|
import { Translate } from './translate';
|
|
import { getLanguage } from '@capital/common';
|
|
|
|
export function encode(human: string): string {
|
|
return Miao.encode(human, {
|
|
calls: Translate.calls,
|
|
halfwidthSymbol: getLanguage() !== 'zh-CN',
|
|
});
|
|
}
|
|
|
|
export function decode(miao: string): string {
|
|
return Miao.decode(miao);
|
|
}
|
|
|
|
export function isMiao(input: string): boolean {
|
|
return Miao.isMiao(input);
|
|
}
|