Schema
/ API Reference / GuardsSchema
/ API Reference / GuardsisNumberSchema
A function that checks if a JSON schema is an JSON number schema.
The Gist
import { isNumberSchema, T_JSONSchema } from '@weser/schema'
const schema: T_JSONSchema = {
type: 'number',
}
const isNumber = isNumberSchema(schema)
Parameters
Parameter | Type | Description |
---|---|---|
schema | T_JSONSchema | The JSON schema to check. |
Returns
(boolean
) Whether the schema is a number schema.
© 2024-present Robin Weser. All Rights Reserved.