This commit is contained in:
syuilo
2020-09-02 20:46:54 +09:00
parent b8e71b47e3
commit e29ca5a12c
2 changed files with 18 additions and 3 deletions

View File

@ -0,0 +1,16 @@
const invalidChars = [
'@',
'#',
'*',
':',
'(',
')',
'[',
']',
' ',
' ',
];
export function safeForInterpolate(text: string): boolean {
return !invalidChars.some(c => text.includes(c));
}