From 4626eddd3bc79a30b0d45179019b19d4fe0fe4d4 Mon Sep 17 00:00:00 2001 From: natemoo-re Date: Thu, 21 Jul 2022 17:18:01 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/runtime/server/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts index 368917b06..5cc44b29e 100644 --- a/packages/astro/src/runtime/server/index.ts +++ b/packages/astro/src/runtime/server/index.ts @@ -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) => 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) => + Object.entries(obj) + .map(([k, v]) => `${kebab(k)}:${v}`) + .join(';'); const STATIC_DIRECTIVES = new Set(['set:html', 'set:text']);