MCPcopy Index your code
hub / github.com/Effect-TS/effect / between

Function between

packages/effect/src/Schema.ts:5200–5214  ·  view source on GitHub ↗
(
  minimum: number,
  maximum: number,
  annotations?: Annotations.Filter<Schema.Type<S>>
)

Source from the content-addressed store, hash-verified

5198 * @since 3.10.0
5199 */
5200export const between = <S extends Schema.Any>(
5201 minimum: number,
5202 maximum: number,
5203 annotations?: Annotations.Filter<Schema.Type<S>>
5204) =>
5205<A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>): filter<S> =>
5206 self.pipe(
5207 filter((a) => a >= minimum && a <= maximum, {
5208 schemaId: BetweenSchemaId,
5209 title: `between(${minimum}, ${maximum})`,
5210 description: `a number between ${minimum} and ${maximum}`,
5211 jsonSchema: { minimum, maximum },
5212 ...annotations
5213 })
5214 )
5215
5216/**
5217 * @category schema id

Callers 3

clampFunction · 0.70
Uint8Class · 0.70
Order.test.tsFile · 0.50

Calls 2

filterFunction · 0.70
pipeMethod · 0.65

Tested by

no test coverage detected