style: auto fix.

This commit is contained in:
2022-10-17 15:37:01 +00:00
parent 10f64a9ba4
commit c081d55a32
68 changed files with 1403 additions and 1114 deletions

View File

@@ -1,7 +1,7 @@
const { replace } = ''
const { replace } = '';
// escape
const ca = /[&<>'"]/g
const ca = /[&<>'"]/g;
const esca = {
'&': '&amp;',
@@ -9,8 +9,8 @@ const esca = {
'>': '&gt;',
"'": '&#39;',
'"': '&quot;',
}
const pe = (m: keyof typeof esca) => esca[m]
};
const pe = (m: keyof typeof esca) => esca[m];
/**
* Safely escape HTML entities such as `&`, `<`, `>`, `"`, and `'`.
@@ -19,4 +19,4 @@ const pe = (m: keyof typeof esca) => esca[m]
* the input type is unexpected, except for boolean and numbers,
* converted as string.
*/
export const escape = (es: string): string => replace.call(es, ca, pe)
export const escape = (es: string): string => replace.call(es, ca, pe);