Schema
/ API Reference / Guards
Schema
/ API Reference / Guards

isStringSchema

A function that checks if a JSON schema is an JSON string schema.

The Gist

import { isStringSchema, T_JSONSchema } from '@weser/schema'

const schema: T_JSONSchema = { type: 'string' }

const isString = isStringSchema(schema)

Parameters

ParameterTypeDescription
schemaT_JSONSchemaThe JSON schema to check.

Returns

(boolean) Whether the schema is a string schema.

On this page