MCPcopy Create free account
hub / github.com/effect-app/libs / isBetween

Function isBetween

repos/effect/packages/effect/src/Order.ts:926–942  ·  view source on GitHub ↗
(O: Order<A>)

Source from the content-addressed store, hash-verified

924 * @since 4.0.0
925 */
926export const isBetween = <A>(O: Order<A>): {
927 (options: {
928 minimum: A
929 maximum: A
930 }): (self: A) => boolean
931 (self: A, options: {
932 minimum: A
933 maximum: A
934 }): boolean
935} =>
936 dual(
937 2,
938 (self: A, options: {
939 minimum: A
940 maximum: A
941 }): boolean => !isLessThan(O)(self, options.minimum) && !isGreaterThan(O)(self, options.maximum)
942 )
943
944/**
945 * Creates a `Reducer` for combining `Order` instances, useful for aggregating orders in collections.

Callers 3

Schema.test.tsFile · 0.85
isInt32Function · 0.85
isUint32Function · 0.85

Calls 2

isLessThanFunction · 0.85
isGreaterThanFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…