MCPcopy Create free account
hub / github.com/formkit/formkit / shorten

Function shorten

packages/cli/src/theme.ts:285–293  ·  view source on GitHub ↗

* Use the public formkit url shortener. * @param url - A url to shorten

(url: string)

Source from the content-addressed store, hash-verified

283 * @param url - A url to shorten
284 */
285async function shorten(url: string): Promise<string> {
286 const res = await fetch('https://www.formk.it', {
287 method: 'POST',
288 headers: { 'Content-Type': 'application/json' },
289 body: JSON.stringify({ url }),
290 })
291 const data = await res.json()
292 return data.url
293}
294
295async function editMode(
296 theme: string,

Callers 1

editModeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected