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

Function betweenBigInt

packages/effect/src/Schema.ts:5620–5634  ·  view source on GitHub ↗
(
  min: bigint,
  max: bigint,
  annotations?: Annotations.Filter<Schema.Type<S>>
)

Source from the content-addressed store, hash-verified

5618 * @since 3.10.0
5619 */
5620export const betweenBigInt = <S extends Schema.Any>(
5621 min: bigint,
5622 max: bigint,
5623 annotations?: Annotations.Filter<Schema.Type<S>>
5624) =>
5625<A extends bigint>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>): filter<S> =>
5626 self.pipe(
5627 filter((a) => a >= min && a <= max, {
5628 schemaId: BetweenBigIntSchemaId,
5629 [BetweenBigIntSchemaId]: { min, max },
5630 title: `betweenBigInt(${min}, ${max})`,
5631 description: `a bigint between ${min}n and ${max}n`,
5632 ...annotations
5633 })
5634 )
5635
5636/**
5637 * @category bigint filters

Callers 2

clampBigIntFunction · 0.85
BigIntFromNumberClass · 0.85

Calls 2

filterFunction · 0.70
pipeMethod · 0.65

Tested by

no test coverage detected