@prismicio/client
Version:
The official JavaScript + TypeScript client library for Prismic
1 lines • 669 B
Source Map (JSON)
{"version":3,"file":"isRepositoryEndpoint.cjs","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string is a Prismic Content API endpoint. Note that any valid\n * URL is a valid endpoint to support network proxies.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic Content API endpoint, `false`\n * otherwise.\n */\nexport const isRepositoryEndpoint = (input: string): boolean => {\n\ttry {\n\t\tnew URL(input)\n\n\t\treturn true\n\t} catch {\n\t\treturn false\n\t}\n}\n"],"mappings":";;;;;;;;;;;AASA,MAAa,wBAAwB,UAA2B;AAC/D,KAAI;AACH,MAAI,IAAI,MAAM;AAEd,SAAO;SACA;AACP,SAAO"}