MCPcopy Create free account
hub / github.com/vercel/examples / toArray

Function toArray

internal/scripts/lib/contentful/get-template.ts:18–19  ·  view source on GitHub ↗
(val?: string | string[])

Source from the content-addressed store, hash-verified

16}
17
18const toArray = (val?: string | string[]) =>
19 typeof val === 'string' ? [val] : val ?? []
20
21export default async function getTemplate(readme: string) {
22 const { body, attributes } = frontMatter<Attributes>(readme)

Callers 1

getTemplateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected