[ci] format
This commit is contained in:
parent
2a5e92facd
commit
4626eddd3b
1 changed files with 6 additions and 2 deletions
|
@ -542,8 +542,12 @@ export function createAstro(
|
|||
const toAttributeString = (value: any, shouldEscape = true) =>
|
||||
shouldEscape ? String(value).replace(/&/g, '&').replace(/"/g, '"') : value;
|
||||
|
||||
const kebab = (k: string) => k.toLowerCase() === k ? k : k.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`);
|
||||
const toStyleString = (obj: Record<string, any>) => Object.entries(obj).map(([k, v]) => `${kebab(k)}:${v}`).join(';')
|
||||
const kebab = (k: string) =>
|
||||
k.toLowerCase() === k ? k : k.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);
|
||||
const toStyleString = (obj: Record<string, any>) =>
|
||||
Object.entries(obj)
|
||||
.map(([k, v]) => `${kebab(k)}:${v}`)
|
||||
.join(';');
|
||||
|
||||
const STATIC_DIRECTIVES = new Set(['set:html', 'set:text']);
|
||||
|
||||
|
|
Loading…
Reference in a new issue