[ci] format

This commit is contained in:
natemoo-re 2022-07-21 17:18:01 +00:00 committed by fredkbot
parent 2a5e92facd
commit 4626eddd3b

View file

@ -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']);