MCPcopy Create free account
hub / github.com/Effect-TS/effect / isBetween

Function isBetween

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

Source from the content-addressed store, hash-verified

956 * @since 4.0.0
957 */
958export const isBetween = <A>(O: Order<A>): {
959 (options: {
960 minimum: A
961 maximum: A
962 }): (self: A) => boolean
963 (self: A, options: {
964 minimum: A
965 maximum: A
966 }): boolean
967} =>
968 dual(
969 2,
970 (self: A, options: {
971 minimum: A
972 maximum: A
973 }): boolean => !isLessThan(O)(self, options.minimum) && !isGreaterThan(O)(self, options.maximum)
974 )
975
976/**
977 * Creates a `Reducer` for combining `Order` instances, useful for aggregating orders in collections.

Callers 5

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

Calls 2

isLessThanFunction · 0.85
isGreaterThanFunction · 0.85

Tested by

no test coverage detected