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

isBooleanSchema

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

The Gist

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

const schema: T_JSONSchema = {
  type: 'boolean',
}

const isBoolean = isBooleanSchema(schema)

Parameters

ParameterTypeDescription
schemaT_JSONSchemaThe JSON schema to check.

Returns

(boolean) Whether the schema is a boolean schema.

On this page