Hyperlinkv0.8.0-beta.28

Schema

Schema.isBetweenconsteffect/Schema.ts:7456
(
  options: {
    readonly minimum: number
    readonly maximum: number
    readonly exclusiveMinimum?: boolean | undefined
    readonly exclusiveMaximum?: boolean | undefined
  },
  annotations?: Annotations.Filter
): SchemaAST.Filter<number>

Validates that a number is within a specified range. The range boundaries can be inclusive or exclusive based on the provided options.

Details

JSON Schema:

This check corresponds to minimum/maximum or exclusiveMinimum/exclusiveMaximum constraints in JSON Schema, depending on the options provided.

Arbitrary:

When generating test data with fast-check, this applies minimum and maximum constraints with optional exclusiveMinimum and exclusiveMaximum flags to ensure generated numbers fall within the specified range.

Number checks
Source effect/Schema.ts:745611 lines
export const isBetween = makeIsBetween({
  order: Order.Number,
  annotate: (options) => {
    return {
      meta: {
        _tag: "isBetween",
        ...options
      }
    }
  }
})
Referenced by 4 symbols