MCPcopy
hub / github.com/GitbookIO/gitbook / isJSON

Function isJSON

packages/react-openapi/src/contentTypeChecks.ts:1–3  ·  view source on GitHub ↗
(contentType?: string)

Source from the content-addressed store, hash-verified

1export function isJSON(contentType?: string): boolean {
2 return contentType?.toLowerCase().includes('application/json') || false;
3}
4
5export function isXML(contentType?: string): boolean {
6 return contentType?.toLowerCase().includes('application/xml') || false;

Callers 1

code-samples.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected