effect 3.13.7 → 3.13.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Array.js +460 -431
- package/dist/cjs/Array.js.map +1 -1
- package/dist/cjs/BigDecimal.js +31 -89
- package/dist/cjs/BigDecimal.js.map +1 -1
- package/dist/cjs/BigInt.js +27 -71
- package/dist/cjs/BigInt.js.map +1 -1
- package/dist/cjs/Boolean.js +12 -10
- package/dist/cjs/Boolean.js.map +1 -1
- package/dist/cjs/Brand.js +2 -0
- package/dist/cjs/Brand.js.map +1 -1
- package/dist/cjs/Channel.js +0 -2
- package/dist/cjs/Channel.js.map +1 -1
- package/dist/cjs/Chunk.js +4 -0
- package/dist/cjs/Chunk.js.map +1 -1
- package/dist/cjs/Config.js +0 -5
- package/dist/cjs/Config.js.map +1 -1
- package/dist/cjs/Context.js +14 -24
- package/dist/cjs/Context.js.map +1 -1
- package/dist/cjs/Cron.js +11 -25
- package/dist/cjs/Cron.js.map +1 -1
- package/dist/cjs/Data.js +6 -0
- package/dist/cjs/Data.js.map +1 -1
- package/dist/cjs/DateTime.js +2 -0
- package/dist/cjs/DateTime.js.map +1 -1
- package/dist/cjs/Duration.js +2 -2
- package/dist/cjs/Effect.js +122 -53
- package/dist/cjs/Effect.js.map +1 -1
- package/dist/cjs/Either.js +21 -25
- package/dist/cjs/Either.js.map +1 -1
- package/dist/cjs/Encoding.js +1 -1
- package/dist/cjs/Equivalence.js +1 -1
- package/dist/cjs/Function.js +21 -24
- package/dist/cjs/Function.js.map +1 -1
- package/dist/cjs/HashMap.js +0 -3
- package/dist/cjs/HashMap.js.map +1 -1
- package/dist/cjs/Iterable.js +9 -2
- package/dist/cjs/Iterable.js.map +1 -1
- package/dist/cjs/List.js +2 -0
- package/dist/cjs/List.js.map +1 -1
- package/dist/cjs/Logger.js +0 -2
- package/dist/cjs/Logger.js.map +1 -1
- package/dist/cjs/Mailbox.js +1 -0
- package/dist/cjs/Mailbox.js.map +1 -1
- package/dist/cjs/ManagedRuntime.js +0 -2
- package/dist/cjs/ManagedRuntime.js.map +1 -1
- package/dist/cjs/Metric.js +6 -12
- package/dist/cjs/Metric.js.map +1 -1
- package/dist/cjs/Number.js +22 -61
- package/dist/cjs/Number.js.map +1 -1
- package/dist/cjs/Option.js +5 -0
- package/dist/cjs/Option.js.map +1 -1
- package/dist/cjs/Order.js +1 -0
- package/dist/cjs/Order.js.map +1 -1
- package/dist/cjs/Ordering.js +2 -7
- package/dist/cjs/Ordering.js.map +1 -1
- package/dist/cjs/ParseResult.js +14 -8
- package/dist/cjs/ParseResult.js.map +1 -1
- package/dist/cjs/Pool.js +1 -1
- package/dist/cjs/Predicate.js +36 -77
- package/dist/cjs/Predicate.js.map +1 -1
- package/dist/cjs/Random.js +1 -2
- package/dist/cjs/Random.js.map +1 -1
- package/dist/cjs/RcMap.js +5 -2
- package/dist/cjs/RcMap.js.map +1 -1
- package/dist/cjs/Record.js +28 -107
- package/dist/cjs/Record.js.map +1 -1
- package/dist/cjs/Redacted.js +3 -0
- package/dist/cjs/Redacted.js.map +1 -1
- package/dist/cjs/RegExp.js +2 -2
- package/dist/cjs/RegExp.js.map +1 -1
- package/dist/cjs/STM.js +3 -5
- package/dist/cjs/STM.js.map +1 -1
- package/dist/cjs/Schedule.js +2 -2
- package/dist/cjs/Schema.js +19 -16
- package/dist/cjs/Schema.js.map +1 -1
- package/dist/cjs/SchemaAST.js +0 -2
- package/dist/cjs/SchemaAST.js.map +1 -1
- package/dist/cjs/Sink.js +14 -10
- package/dist/cjs/Sink.js.map +1 -1
- package/dist/cjs/Stream.js +24 -25
- package/dist/cjs/Stream.js.map +1 -1
- package/dist/cjs/String.js +31 -2
- package/dist/cjs/String.js.map +1 -1
- package/dist/cjs/Struct.js +6 -0
- package/dist/cjs/Struct.js.map +1 -1
- package/dist/cjs/Symbol.js +1 -2
- package/dist/cjs/Symbol.js.map +1 -1
- package/dist/cjs/TestClock.js.map +1 -1
- package/dist/cjs/Trie.js +28 -0
- package/dist/cjs/Trie.js.map +1 -1
- package/dist/cjs/Tuple.js +9 -24
- package/dist/cjs/Tuple.js.map +1 -1
- package/dist/cjs/internal/matcher.js +1 -1
- package/dist/cjs/internal/matcher.js.map +1 -1
- package/dist/cjs/internal/version.js +1 -1
- package/dist/dts/Array.d.ts +1235 -1188
- package/dist/dts/Array.d.ts.map +1 -1
- package/dist/dts/BigDecimal.d.ts +61 -189
- package/dist/dts/BigDecimal.d.ts.map +1 -1
- package/dist/dts/BigInt.d.ts +57 -165
- package/dist/dts/BigInt.d.ts.map +1 -1
- package/dist/dts/Boolean.d.ts +28 -18
- package/dist/dts/Boolean.d.ts.map +1 -1
- package/dist/dts/Brand.d.ts +3 -3
- package/dist/dts/Brand.d.ts.map +1 -1
- package/dist/dts/Channel.d.ts +0 -6
- package/dist/dts/Channel.d.ts.map +1 -1
- package/dist/dts/Chunk.d.ts +15 -0
- package/dist/dts/Chunk.d.ts.map +1 -1
- package/dist/dts/Config.d.ts +0 -5
- package/dist/dts/Config.d.ts.map +1 -1
- package/dist/dts/Context.d.ts +26 -54
- package/dist/dts/Context.d.ts.map +1 -1
- package/dist/dts/Cron.d.ts +9 -23
- package/dist/dts/Cron.d.ts.map +1 -1
- package/dist/dts/Data.d.ts +8 -0
- package/dist/dts/Data.d.ts.map +1 -1
- package/dist/dts/DateTime.d.ts +6 -0
- package/dist/dts/DateTime.d.ts.map +1 -1
- package/dist/dts/Duration.d.ts +2 -2
- package/dist/dts/Effect.d.ts +153 -71
- package/dist/dts/Effect.d.ts.map +1 -1
- package/dist/dts/Either.d.ts +44 -57
- package/dist/dts/Either.d.ts.map +1 -1
- package/dist/dts/Encoding.d.ts +1 -1
- package/dist/dts/Equivalence.d.ts +1 -1
- package/dist/dts/Function.d.ts +55 -59
- package/dist/dts/Function.d.ts.map +1 -1
- package/dist/dts/HashMap.d.ts +0 -9
- package/dist/dts/HashMap.d.ts.map +1 -1
- package/dist/dts/Iterable.d.ts +13 -2
- package/dist/dts/Iterable.d.ts.map +1 -1
- package/dist/dts/List.d.ts +10 -0
- package/dist/dts/List.d.ts.map +1 -1
- package/dist/dts/Logger.d.ts +0 -6
- package/dist/dts/Logger.d.ts.map +1 -1
- package/dist/dts/Mailbox.d.ts +1 -0
- package/dist/dts/Mailbox.d.ts.map +1 -1
- package/dist/dts/ManagedRuntime.d.ts +0 -2
- package/dist/dts/ManagedRuntime.d.ts.map +1 -1
- package/dist/dts/Metric.d.ts +14 -20
- package/dist/dts/Metric.d.ts.map +1 -1
- package/dist/dts/Micro.d.ts +1 -1
- package/dist/dts/Number.d.ts +52 -155
- package/dist/dts/Number.d.ts.map +1 -1
- package/dist/dts/Option.d.ts +12 -0
- package/dist/dts/Option.d.ts.map +1 -1
- package/dist/dts/Order.d.ts +1 -0
- package/dist/dts/Order.d.ts.map +1 -1
- package/dist/dts/Ordering.d.ts +4 -17
- package/dist/dts/Ordering.d.ts.map +1 -1
- package/dist/dts/Pool.d.ts +1 -1
- package/dist/dts/Predicate.d.ts +56 -133
- package/dist/dts/Predicate.d.ts.map +1 -1
- package/dist/dts/Random.d.ts +1 -2
- package/dist/dts/Random.d.ts.map +1 -1
- package/dist/dts/RcMap.d.ts +15 -6
- package/dist/dts/RcMap.d.ts.map +1 -1
- package/dist/dts/Record.d.ts +68 -279
- package/dist/dts/Record.d.ts.map +1 -1
- package/dist/dts/Redacted.d.ts +3 -0
- package/dist/dts/Redacted.d.ts.map +1 -1
- package/dist/dts/RegExp.d.ts +2 -2
- package/dist/dts/RegExp.d.ts.map +1 -1
- package/dist/dts/STM.d.ts +5 -7
- package/dist/dts/STM.d.ts.map +1 -1
- package/dist/dts/Schedule.d.ts +7 -7
- package/dist/dts/Schema.d.ts +32 -26
- package/dist/dts/Schema.d.ts.map +1 -1
- package/dist/dts/SchemaAST.d.ts +0 -2
- package/dist/dts/SchemaAST.d.ts.map +1 -1
- package/dist/dts/Sink.d.ts +14 -10
- package/dist/dts/Sink.d.ts.map +1 -1
- package/dist/dts/Stream.d.ts +58 -62
- package/dist/dts/Stream.d.ts.map +1 -1
- package/dist/dts/String.d.ts +47 -2
- package/dist/dts/String.d.ts.map +1 -1
- package/dist/dts/Struct.d.ts +12 -0
- package/dist/dts/Struct.d.ts.map +1 -1
- package/dist/dts/Symbol.d.ts +1 -2
- package/dist/dts/Symbol.d.ts.map +1 -1
- package/dist/dts/TestClock.d.ts +2 -1
- package/dist/dts/TestClock.d.ts.map +1 -1
- package/dist/dts/Trie.d.ts +66 -0
- package/dist/dts/Trie.d.ts.map +1 -1
- package/dist/dts/Tuple.d.ts +21 -62
- package/dist/dts/Tuple.d.ts.map +1 -1
- package/dist/dts/Utils.d.ts +8 -8
- package/dist/esm/Array.js +474 -442
- package/dist/esm/Array.js.map +1 -1
- package/dist/esm/BigDecimal.js +31 -89
- package/dist/esm/BigDecimal.js.map +1 -1
- package/dist/esm/BigInt.js +27 -71
- package/dist/esm/BigInt.js.map +1 -1
- package/dist/esm/Boolean.js +12 -10
- package/dist/esm/Boolean.js.map +1 -1
- package/dist/esm/Brand.js +2 -0
- package/dist/esm/Brand.js.map +1 -1
- package/dist/esm/Channel.js +0 -2
- package/dist/esm/Channel.js.map +1 -1
- package/dist/esm/Chunk.js +4 -0
- package/dist/esm/Chunk.js.map +1 -1
- package/dist/esm/Config.js +0 -5
- package/dist/esm/Config.js.map +1 -1
- package/dist/esm/Context.js +14 -24
- package/dist/esm/Context.js.map +1 -1
- package/dist/esm/Cron.js +11 -25
- package/dist/esm/Cron.js.map +1 -1
- package/dist/esm/Data.js +7 -0
- package/dist/esm/Data.js.map +1 -1
- package/dist/esm/DateTime.js +2 -0
- package/dist/esm/DateTime.js.map +1 -1
- package/dist/esm/Duration.js +2 -2
- package/dist/esm/Effect.js +123 -53
- package/dist/esm/Effect.js.map +1 -1
- package/dist/esm/Either.js +22 -25
- package/dist/esm/Either.js.map +1 -1
- package/dist/esm/Encoding.js +1 -1
- package/dist/esm/Equivalence.js +1 -1
- package/dist/esm/Function.js +21 -24
- package/dist/esm/Function.js.map +1 -1
- package/dist/esm/HashMap.js +0 -3
- package/dist/esm/HashMap.js.map +1 -1
- package/dist/esm/Iterable.js +9 -2
- package/dist/esm/Iterable.js.map +1 -1
- package/dist/esm/List.js +2 -0
- package/dist/esm/List.js.map +1 -1
- package/dist/esm/Logger.js +0 -2
- package/dist/esm/Logger.js.map +1 -1
- package/dist/esm/Mailbox.js +1 -0
- package/dist/esm/Mailbox.js.map +1 -1
- package/dist/esm/ManagedRuntime.js +0 -2
- package/dist/esm/ManagedRuntime.js.map +1 -1
- package/dist/esm/Metric.js +6 -12
- package/dist/esm/Metric.js.map +1 -1
- package/dist/esm/Micro.js +1 -1
- package/dist/esm/Number.js +22 -61
- package/dist/esm/Number.js.map +1 -1
- package/dist/esm/Option.js +6 -0
- package/dist/esm/Option.js.map +1 -1
- package/dist/esm/Order.js +1 -0
- package/dist/esm/Order.js.map +1 -1
- package/dist/esm/Ordering.js +2 -7
- package/dist/esm/Ordering.js.map +1 -1
- package/dist/esm/ParseResult.js +14 -8
- package/dist/esm/ParseResult.js.map +1 -1
- package/dist/esm/Pool.js +1 -1
- package/dist/esm/Predicate.js +36 -77
- package/dist/esm/Predicate.js.map +1 -1
- package/dist/esm/Random.js +1 -2
- package/dist/esm/Random.js.map +1 -1
- package/dist/esm/RcMap.js +5 -2
- package/dist/esm/RcMap.js.map +1 -1
- package/dist/esm/Record.js +28 -107
- package/dist/esm/Record.js.map +1 -1
- package/dist/esm/Redacted.js +3 -0
- package/dist/esm/Redacted.js.map +1 -1
- package/dist/esm/RegExp.js +2 -2
- package/dist/esm/RegExp.js.map +1 -1
- package/dist/esm/STM.js +3 -5
- package/dist/esm/STM.js.map +1 -1
- package/dist/esm/Schedule.js +2 -2
- package/dist/esm/Schema.js +19 -16
- package/dist/esm/Schema.js.map +1 -1
- package/dist/esm/SchemaAST.js +0 -2
- package/dist/esm/SchemaAST.js.map +1 -1
- package/dist/esm/Sink.js +14 -10
- package/dist/esm/Sink.js.map +1 -1
- package/dist/esm/Stream.js +25 -25
- package/dist/esm/Stream.js.map +1 -1
- package/dist/esm/String.js +31 -2
- package/dist/esm/String.js.map +1 -1
- package/dist/esm/Struct.js +6 -0
- package/dist/esm/Struct.js.map +1 -1
- package/dist/esm/Symbol.js +1 -2
- package/dist/esm/Symbol.js.map +1 -1
- package/dist/esm/TestClock.js.map +1 -1
- package/dist/esm/Trie.js +28 -0
- package/dist/esm/Trie.js.map +1 -1
- package/dist/esm/Tuple.js +11 -30
- package/dist/esm/Tuple.js.map +1 -1
- package/dist/esm/internal/matcher.js +1 -1
- package/dist/esm/internal/matcher.js.map +1 -1
- package/dist/esm/internal/version.js +1 -1
- package/package.json +1 -1
- package/src/Array.ts +1235 -1188
- package/src/BigDecimal.ts +61 -189
- package/src/BigInt.ts +57 -165
- package/src/Boolean.ts +28 -18
- package/src/Brand.ts +3 -3
- package/src/Channel.ts +0 -6
- package/src/Chunk.ts +16 -0
- package/src/Config.ts +0 -5
- package/src/Context.ts +26 -54
- package/src/Cron.ts +11 -25
- package/src/Data.ts +8 -0
- package/src/DateTime.ts +6 -0
- package/src/Duration.ts +2 -2
- package/src/Effect.ts +153 -71
- package/src/Either.ts +45 -58
- package/src/Encoding.ts +1 -1
- package/src/Equivalence.ts +1 -1
- package/src/Function.ts +55 -59
- package/src/HashMap.ts +0 -9
- package/src/Iterable.ts +13 -2
- package/src/List.ts +12 -0
- package/src/Logger.ts +0 -6
- package/src/Mailbox.ts +1 -0
- package/src/ManagedRuntime.ts +0 -2
- package/src/Metric.ts +14 -20
- package/src/Micro.ts +1 -1
- package/src/Number.ts +52 -155
- package/src/Option.ts +12 -0
- package/src/Order.ts +1 -0
- package/src/Ordering.ts +4 -17
- package/src/ParseResult.ts +16 -9
- package/src/Pool.ts +1 -1
- package/src/Predicate.ts +56 -133
- package/src/Random.ts +1 -2
- package/src/RcMap.ts +15 -6
- package/src/Record.ts +68 -279
- package/src/Redacted.ts +3 -0
- package/src/RegExp.ts +2 -2
- package/src/STM.ts +5 -7
- package/src/Schedule.ts +7 -7
- package/src/Schema.ts +37 -28
- package/src/SchemaAST.ts +0 -2
- package/src/Sink.ts +14 -10
- package/src/Stream.ts +56 -61
- package/src/String.ts +47 -2
- package/src/Struct.ts +12 -0
- package/src/Symbol.ts +1 -2
- package/src/TestClock.ts +2 -1
- package/src/Trie.ts +66 -0
- package/src/Tuple.ts +21 -62
- package/src/Utils.ts +8 -8
- package/src/internal/matcher.ts +1 -1
- package/src/internal/version.ts +1 -1
package/dist/esm/Predicate.js
CHANGED
|
@@ -5,11 +5,9 @@ import { dual, isFunction as isFunction_ } from "./Function.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* Given a `Predicate<A>` returns a `Predicate<B>`
|
|
7
7
|
*
|
|
8
|
-
* @param self - the `Predicate<A>` to be transformed to `Predicate<B>`.
|
|
9
|
-
* @param f - a function to transform `B` to `A`.
|
|
10
|
-
*
|
|
11
8
|
* @example
|
|
12
9
|
* ```ts
|
|
10
|
+
* import * as assert from "node:assert"
|
|
13
11
|
* import { Predicate, Number } from "effect"
|
|
14
12
|
*
|
|
15
13
|
* const minLength3 = Predicate.mapInput(Number.greaterThan(2), (s: string) => s.length)
|
|
@@ -29,11 +27,9 @@ export const mapInput = /*#__PURE__*/dual(2, (self, f) => b => self(f(b)));
|
|
|
29
27
|
*
|
|
30
28
|
* An `Array` is considered to be a `TupleOf` if its length is exactly `N`.
|
|
31
29
|
*
|
|
32
|
-
* @param self - The `Array` to check.
|
|
33
|
-
* @param n - The exact number of elements that the `Array` should have to be considered a `TupleOf`.
|
|
34
|
-
*
|
|
35
30
|
* @example
|
|
36
31
|
* ```ts
|
|
32
|
+
* import * as assert from "node:assert"
|
|
37
33
|
* import { isTupleOf } from "effect/Predicate"
|
|
38
34
|
*
|
|
39
35
|
* assert.deepStrictEqual(isTupleOf([1, 2, 3], 3), true);
|
|
@@ -56,11 +52,9 @@ export const isTupleOf = /*#__PURE__*/dual(2, (self, n) => self.length === n);
|
|
|
56
52
|
*
|
|
57
53
|
* An `Array` is considered to be a `TupleOfAtLeast` if its length is at least `N`.
|
|
58
54
|
*
|
|
59
|
-
* @param self - The `Array` to check.
|
|
60
|
-
* @param n - The minimum number of elements that the `Array` should have to be considered a `TupleOfAtLeast`.
|
|
61
|
-
*
|
|
62
55
|
* @example
|
|
63
56
|
* ```ts
|
|
57
|
+
* import * as assert from "node:assert"
|
|
64
58
|
* import { isTupleOfAtLeast } from "effect/Predicate"
|
|
65
59
|
*
|
|
66
60
|
* assert.deepStrictEqual(isTupleOfAtLeast([1, 2, 3], 3), true);
|
|
@@ -81,10 +75,9 @@ export const isTupleOfAtLeast = /*#__PURE__*/dual(2, (self, n) => self.length >=
|
|
|
81
75
|
/**
|
|
82
76
|
* Tests if a value is `truthy`.
|
|
83
77
|
*
|
|
84
|
-
* @param input - The value to test.
|
|
85
|
-
*
|
|
86
78
|
* @example
|
|
87
79
|
* ```ts
|
|
80
|
+
* import * as assert from "node:assert"
|
|
88
81
|
* import { isTruthy } from "effect/Predicate"
|
|
89
82
|
*
|
|
90
83
|
* assert.deepStrictEqual(isTruthy(1), true)
|
|
@@ -99,10 +92,9 @@ export const isTruthy = input => !!input;
|
|
|
99
92
|
/**
|
|
100
93
|
* Tests if a value is a `Set`.
|
|
101
94
|
*
|
|
102
|
-
* @param input - The value to test.
|
|
103
|
-
*
|
|
104
95
|
* @example
|
|
105
96
|
* ```ts
|
|
97
|
+
* import * as assert from "node:assert"
|
|
106
98
|
* import { isSet } from "effect/Predicate"
|
|
107
99
|
*
|
|
108
100
|
* assert.deepStrictEqual(isSet(new Set([1, 2])), true)
|
|
@@ -119,10 +111,9 @@ export const isSet = input => input instanceof Set;
|
|
|
119
111
|
/**
|
|
120
112
|
* Tests if a value is a `Map`.
|
|
121
113
|
*
|
|
122
|
-
* @param input - The value to test.
|
|
123
|
-
*
|
|
124
114
|
* @example
|
|
125
115
|
* ```ts
|
|
116
|
+
* import * as assert from "node:assert"
|
|
126
117
|
* import { isMap } from "effect/Predicate"
|
|
127
118
|
*
|
|
128
119
|
* assert.deepStrictEqual(isMap(new Map()), true)
|
|
@@ -138,10 +129,9 @@ export const isMap = input => input instanceof Map;
|
|
|
138
129
|
/**
|
|
139
130
|
* Tests if a value is a `string`.
|
|
140
131
|
*
|
|
141
|
-
* @param input - The value to test.
|
|
142
|
-
*
|
|
143
132
|
* @example
|
|
144
133
|
* ```ts
|
|
134
|
+
* import * as assert from "node:assert"
|
|
145
135
|
* import { isString } from "effect/Predicate"
|
|
146
136
|
*
|
|
147
137
|
* assert.deepStrictEqual(isString("a"), true)
|
|
@@ -156,10 +146,9 @@ export const isString = input => typeof input === "string";
|
|
|
156
146
|
/**
|
|
157
147
|
* Tests if a value is a `number`.
|
|
158
148
|
*
|
|
159
|
-
* @param input - The value to test.
|
|
160
|
-
*
|
|
161
149
|
* @example
|
|
162
150
|
* ```ts
|
|
151
|
+
* import * as assert from "node:assert"
|
|
163
152
|
* import { isNumber } from "effect/Predicate"
|
|
164
153
|
*
|
|
165
154
|
* assert.deepStrictEqual(isNumber(2), true)
|
|
@@ -174,10 +163,9 @@ export const isNumber = input => typeof input === "number";
|
|
|
174
163
|
/**
|
|
175
164
|
* Tests if a value is a `boolean`.
|
|
176
165
|
*
|
|
177
|
-
* @param input - The value to test.
|
|
178
|
-
*
|
|
179
166
|
* @example
|
|
180
167
|
* ```ts
|
|
168
|
+
* import * as assert from "node:assert"
|
|
181
169
|
* import { isBoolean } from "effect/Predicate"
|
|
182
170
|
*
|
|
183
171
|
* assert.deepStrictEqual(isBoolean(true), true)
|
|
@@ -192,10 +180,9 @@ export const isBoolean = input => typeof input === "boolean";
|
|
|
192
180
|
/**
|
|
193
181
|
* Tests if a value is a `bigint`.
|
|
194
182
|
*
|
|
195
|
-
* @param input - The value to test.
|
|
196
|
-
*
|
|
197
183
|
* @example
|
|
198
184
|
* ```ts
|
|
185
|
+
* import * as assert from "node:assert"
|
|
199
186
|
* import { isBigInt } from "effect/Predicate"
|
|
200
187
|
*
|
|
201
188
|
* assert.deepStrictEqual(isBigInt(1n), true)
|
|
@@ -210,10 +197,9 @@ export const isBigInt = input => typeof input === "bigint";
|
|
|
210
197
|
/**
|
|
211
198
|
* Tests if a value is a `symbol`.
|
|
212
199
|
*
|
|
213
|
-
* @param input - The value to test.
|
|
214
|
-
*
|
|
215
200
|
* @example
|
|
216
201
|
* ```ts
|
|
202
|
+
* import * as assert from "node:assert"
|
|
217
203
|
* import { isSymbol } from "effect/Predicate"
|
|
218
204
|
*
|
|
219
205
|
* assert.deepStrictEqual(isSymbol(Symbol.for("a")), true)
|
|
@@ -228,10 +214,9 @@ export const isSymbol = input => typeof input === "symbol";
|
|
|
228
214
|
/**
|
|
229
215
|
* Tests if a value is a `function`.
|
|
230
216
|
*
|
|
231
|
-
* @param input - The value to test.
|
|
232
|
-
*
|
|
233
217
|
* @example
|
|
234
218
|
* ```ts
|
|
219
|
+
* import * as assert from "node:assert"
|
|
235
220
|
* import { isFunction } from "effect/Predicate"
|
|
236
221
|
*
|
|
237
222
|
* assert.deepStrictEqual(isFunction(isFunction), true)
|
|
@@ -246,10 +231,9 @@ export const isFunction = isFunction_;
|
|
|
246
231
|
/**
|
|
247
232
|
* Tests if a value is `undefined`.
|
|
248
233
|
*
|
|
249
|
-
* @param input - The value to test.
|
|
250
|
-
*
|
|
251
234
|
* @example
|
|
252
235
|
* ```ts
|
|
236
|
+
* import * as assert from "node:assert"
|
|
253
237
|
* import { isUndefined } from "effect/Predicate"
|
|
254
238
|
*
|
|
255
239
|
* assert.deepStrictEqual(isUndefined(undefined), true)
|
|
@@ -265,10 +249,9 @@ export const isUndefined = input => input === undefined;
|
|
|
265
249
|
/**
|
|
266
250
|
* Tests if a value is not `undefined`.
|
|
267
251
|
*
|
|
268
|
-
* @param input - The value to test.
|
|
269
|
-
*
|
|
270
252
|
* @example
|
|
271
253
|
* ```ts
|
|
254
|
+
* import * as assert from "node:assert"
|
|
272
255
|
* import { isNotUndefined } from "effect/Predicate"
|
|
273
256
|
*
|
|
274
257
|
* assert.deepStrictEqual(isNotUndefined(null), true)
|
|
@@ -284,10 +267,9 @@ export const isNotUndefined = input => input !== undefined;
|
|
|
284
267
|
/**
|
|
285
268
|
* Tests if a value is `null`.
|
|
286
269
|
*
|
|
287
|
-
* @param input - The value to test.
|
|
288
|
-
*
|
|
289
270
|
* @example
|
|
290
271
|
* ```ts
|
|
272
|
+
* import * as assert from "node:assert"
|
|
291
273
|
* import { isNull } from "effect/Predicate"
|
|
292
274
|
*
|
|
293
275
|
* assert.deepStrictEqual(isNull(null), true)
|
|
@@ -303,10 +285,9 @@ export const isNull = input => input === null;
|
|
|
303
285
|
/**
|
|
304
286
|
* Tests if a value is not `null`.
|
|
305
287
|
*
|
|
306
|
-
* @param input - The value to test.
|
|
307
|
-
*
|
|
308
288
|
* @example
|
|
309
289
|
* ```ts
|
|
290
|
+
* import * as assert from "node:assert"
|
|
310
291
|
* import { isNotNull } from "effect/Predicate"
|
|
311
292
|
*
|
|
312
293
|
* assert.deepStrictEqual(isNotNull(undefined), true)
|
|
@@ -322,10 +303,9 @@ export const isNotNull = input => input !== null;
|
|
|
322
303
|
/**
|
|
323
304
|
* A guard that always fails.
|
|
324
305
|
*
|
|
325
|
-
* @param _ - The value to test.
|
|
326
|
-
*
|
|
327
306
|
* @example
|
|
328
307
|
* ```ts
|
|
308
|
+
* import * as assert from "node:assert"
|
|
329
309
|
* import { isNever } from "effect/Predicate"
|
|
330
310
|
*
|
|
331
311
|
* assert.deepStrictEqual(isNever(null), false)
|
|
@@ -341,10 +321,9 @@ export const isNever = _ => false;
|
|
|
341
321
|
/**
|
|
342
322
|
* A guard that always succeeds.
|
|
343
323
|
*
|
|
344
|
-
* @param _ - The value to test.
|
|
345
|
-
*
|
|
346
324
|
* @example
|
|
347
325
|
* ```ts
|
|
326
|
+
* import * as assert from "node:assert"
|
|
348
327
|
* import { isUnknown } from "effect/Predicate"
|
|
349
328
|
*
|
|
350
329
|
* assert.deepStrictEqual(isUnknown(null), true)
|
|
@@ -363,10 +342,9 @@ export const isRecordOrArray = input => typeof input === "object" && input !== n
|
|
|
363
342
|
/**
|
|
364
343
|
* Tests if a value is an `object`.
|
|
365
344
|
*
|
|
366
|
-
* @param input - The value to test.
|
|
367
|
-
*
|
|
368
345
|
* @example
|
|
369
346
|
* ```ts
|
|
347
|
+
* import * as assert from "node:assert"
|
|
370
348
|
* import { isObject } from "effect/Predicate"
|
|
371
349
|
*
|
|
372
350
|
* assert.deepStrictEqual(isObject({}), true)
|
|
@@ -383,9 +361,6 @@ export const isObject = input => isRecordOrArray(input) || isFunction(input);
|
|
|
383
361
|
/**
|
|
384
362
|
* Checks whether a value is an `object` containing a specified property key.
|
|
385
363
|
*
|
|
386
|
-
* @param property - The field to check within the object.
|
|
387
|
-
* @param self - The value to examine.
|
|
388
|
-
*
|
|
389
364
|
* @category guards
|
|
390
365
|
* @since 2.0.0
|
|
391
366
|
*/
|
|
@@ -393,11 +368,9 @@ export const hasProperty = /*#__PURE__*/dual(2, (self, property) => isObject(sel
|
|
|
393
368
|
/**
|
|
394
369
|
* Tests if a value is an `object` with a property `_tag` that matches the given tag.
|
|
395
370
|
*
|
|
396
|
-
* @param input - The value to test.
|
|
397
|
-
* @param tag - The tag to test for.
|
|
398
|
-
*
|
|
399
371
|
* @example
|
|
400
372
|
* ```ts
|
|
373
|
+
* import * as assert from "node:assert"
|
|
401
374
|
* import { isTagged } from "effect/Predicate"
|
|
402
375
|
*
|
|
403
376
|
* assert.deepStrictEqual(isTagged(1, "a"), false)
|
|
@@ -415,10 +388,9 @@ export const isTagged = /*#__PURE__*/dual(2, (self, tag) => hasProperty(self, "_
|
|
|
415
388
|
/**
|
|
416
389
|
* A guard that succeeds when the input is `null` or `undefined`.
|
|
417
390
|
*
|
|
418
|
-
* @param input - The value to test.
|
|
419
|
-
*
|
|
420
391
|
* @example
|
|
421
392
|
* ```ts
|
|
393
|
+
* import * as assert from "node:assert"
|
|
422
394
|
* import { isNullable } from "effect/Predicate"
|
|
423
395
|
*
|
|
424
396
|
* assert.deepStrictEqual(isNullable(null), true)
|
|
@@ -435,10 +407,9 @@ export const isNullable = input => input === null || input === undefined;
|
|
|
435
407
|
/**
|
|
436
408
|
* A guard that succeeds when the input is not `null` or `undefined`.
|
|
437
409
|
*
|
|
438
|
-
* @param input - The value to test.
|
|
439
|
-
*
|
|
440
410
|
* @example
|
|
441
411
|
* ```ts
|
|
412
|
+
* import * as assert from "node:assert"
|
|
442
413
|
* import { isNotNullable } from "effect/Predicate"
|
|
443
414
|
*
|
|
444
415
|
* assert.deepStrictEqual(isNotNullable({}), true)
|
|
@@ -455,10 +426,9 @@ export const isNotNullable = input => input !== null && input !== undefined;
|
|
|
455
426
|
/**
|
|
456
427
|
* A guard that succeeds when the input is an `Error`.
|
|
457
428
|
*
|
|
458
|
-
* @param input - The value to test.
|
|
459
|
-
*
|
|
460
429
|
* @example
|
|
461
430
|
* ```ts
|
|
431
|
+
* import * as assert from "node:assert"
|
|
462
432
|
* import { isError } from "effect/Predicate"
|
|
463
433
|
*
|
|
464
434
|
* assert.deepStrictEqual(isError(new Error()), true)
|
|
@@ -474,10 +444,9 @@ export const isError = input => input instanceof Error;
|
|
|
474
444
|
/**
|
|
475
445
|
* A guard that succeeds when the input is a `Uint8Array`.
|
|
476
446
|
*
|
|
477
|
-
* @param input - The value to test.
|
|
478
|
-
*
|
|
479
447
|
* @example
|
|
480
448
|
* ```ts
|
|
449
|
+
* import * as assert from "node:assert"
|
|
481
450
|
* import { isUint8Array } from "effect/Predicate"
|
|
482
451
|
*
|
|
483
452
|
* assert.deepStrictEqual(isUint8Array(new Uint8Array()), true)
|
|
@@ -493,10 +462,9 @@ export const isUint8Array = input => input instanceof Uint8Array;
|
|
|
493
462
|
/**
|
|
494
463
|
* A guard that succeeds when the input is a `Date`.
|
|
495
464
|
*
|
|
496
|
-
* @param input - The value to test.
|
|
497
|
-
*
|
|
498
465
|
* @example
|
|
499
466
|
* ```ts
|
|
467
|
+
* import * as assert from "node:assert"
|
|
500
468
|
* import { isDate } from "effect/Predicate"
|
|
501
469
|
*
|
|
502
470
|
* assert.deepStrictEqual(isDate(new Date()), true)
|
|
@@ -512,10 +480,9 @@ export const isDate = input => input instanceof Date;
|
|
|
512
480
|
/**
|
|
513
481
|
* A guard that succeeds when the input is an `Iterable`.
|
|
514
482
|
*
|
|
515
|
-
* @param input - The value to test.
|
|
516
|
-
*
|
|
517
483
|
* @example
|
|
518
484
|
* ```ts
|
|
485
|
+
* import * as assert from "node:assert"
|
|
519
486
|
* import { isIterable } from "effect/Predicate"
|
|
520
487
|
*
|
|
521
488
|
* assert.deepStrictEqual(isIterable([]), true)
|
|
@@ -532,10 +499,9 @@ export const isIterable = input => hasProperty(input, Symbol.iterator);
|
|
|
532
499
|
/**
|
|
533
500
|
* A guard that succeeds when the input is a record.
|
|
534
501
|
*
|
|
535
|
-
* @param input - The value to test.
|
|
536
|
-
*
|
|
537
502
|
* @example
|
|
538
503
|
* ```ts
|
|
504
|
+
* import * as assert from "node:assert"
|
|
539
505
|
* import { isRecord } from "effect/Predicate"
|
|
540
506
|
*
|
|
541
507
|
* assert.deepStrictEqual(isRecord({}), true)
|
|
@@ -555,10 +521,9 @@ export const isRecord = input => isRecordOrArray(input) && !Array.isArray(input)
|
|
|
555
521
|
/**
|
|
556
522
|
* A guard that succeeds when the input is a readonly record.
|
|
557
523
|
*
|
|
558
|
-
* @param input - The value to test.
|
|
559
|
-
*
|
|
560
524
|
* @example
|
|
561
525
|
* ```ts
|
|
526
|
+
* import * as assert from "node:assert"
|
|
562
527
|
* import { isReadonlyRecord } from "effect/Predicate"
|
|
563
528
|
*
|
|
564
529
|
* assert.deepStrictEqual(isReadonlyRecord({}), true)
|
|
@@ -577,10 +542,9 @@ export const isReadonlyRecord = isRecord;
|
|
|
577
542
|
/**
|
|
578
543
|
* A guard that succeeds when the input is a Promise.
|
|
579
544
|
*
|
|
580
|
-
* @param input - The value to test.
|
|
581
|
-
*
|
|
582
545
|
* @example
|
|
583
546
|
* ```ts
|
|
547
|
+
* import * as assert from "node:assert"
|
|
584
548
|
* import { isPromise } from "effect/Predicate"
|
|
585
549
|
*
|
|
586
550
|
* assert.deepStrictEqual(isPromise({}), false)
|
|
@@ -599,10 +563,9 @@ export const isPromiseLike = input => hasProperty(input, "then") && isFunction(i
|
|
|
599
563
|
/**
|
|
600
564
|
* Tests if a value is a `RegExp`.
|
|
601
565
|
*
|
|
602
|
-
* @param input - The value to test.
|
|
603
|
-
*
|
|
604
566
|
* @example
|
|
605
567
|
* ```ts
|
|
568
|
+
* import * as assert from "node:assert"
|
|
606
569
|
* import { Predicate } from "effect"
|
|
607
570
|
*
|
|
608
571
|
* assert.deepStrictEqual(Predicate.isRegExp(/a/), true)
|
|
@@ -652,7 +615,7 @@ export const productMany = (self, collection) => {
|
|
|
652
615
|
/**
|
|
653
616
|
* Similar to `Promise.all` but operates on `Predicate`s.
|
|
654
617
|
*
|
|
655
|
-
* ```
|
|
618
|
+
* ```ts skip-type-checking
|
|
656
619
|
* [Refinement<A, B>, Refinement<C, D>, ...] -> Refinement<[A, C, ...], [B, D, ...]>
|
|
657
620
|
* [Predicate<A>, Predicate<B>, ...] -> Predicate<[A, B, ...]>
|
|
658
621
|
* [Refinement<A, B>, Predicate<C>, ...] -> Refinement<[A, C, ...], [B, C, ...]>
|
|
@@ -662,7 +625,7 @@ export const productMany = (self, collection) => {
|
|
|
662
625
|
*/
|
|
663
626
|
export const tuple = (...elements) => all(elements);
|
|
664
627
|
/**
|
|
665
|
-
* ```
|
|
628
|
+
* ```ts skip-type-checking
|
|
666
629
|
* { ab: Refinement<A, B>; cd: Refinement<C, D>, ... } -> Refinement<{ ab: A; cd: C; ... }, { ab: B; cd: D; ... }>
|
|
667
630
|
* { a: Predicate<A, B>; b: Predicate<B>, ... } -> Predicate<{ a: A; b: B; ... }>
|
|
668
631
|
* { ab: Refinement<A, B>; c: Predicate<C>, ... } -> Refinement<{ ab: A; c: C; ... }, { ab: B; c: С; ... }>
|
|
@@ -684,10 +647,9 @@ export const struct = fields => {
|
|
|
684
647
|
/**
|
|
685
648
|
* Negates the result of a given predicate.
|
|
686
649
|
*
|
|
687
|
-
* @param self - A predicate.
|
|
688
|
-
*
|
|
689
650
|
* @example
|
|
690
651
|
* ```ts
|
|
652
|
+
* import * as assert from "node:assert"
|
|
691
653
|
* import { Predicate, Number } from "effect"
|
|
692
654
|
*
|
|
693
655
|
* const isPositive = Predicate.not(Number.lessThan(0))
|
|
@@ -704,11 +666,9 @@ export const not = self => a => !self(a);
|
|
|
704
666
|
/**
|
|
705
667
|
* Combines two predicates into a new predicate that returns `true` if at least one of the predicates returns `true`.
|
|
706
668
|
*
|
|
707
|
-
* @param self - A predicate.
|
|
708
|
-
* @param that - A predicate.
|
|
709
|
-
*
|
|
710
669
|
* @example
|
|
711
670
|
* ```ts
|
|
671
|
+
* import * as assert from "node:assert"
|
|
712
672
|
* import { Predicate, Number } from "effect"
|
|
713
673
|
*
|
|
714
674
|
* const nonZero = Predicate.or(Number.lessThan(0), Number.greaterThan(0))
|
|
@@ -725,11 +685,9 @@ export const or = /*#__PURE__*/dual(2, (self, that) => a => self(a) || that(a));
|
|
|
725
685
|
/**
|
|
726
686
|
* Combines two predicates into a new predicate that returns `true` if both of the predicates returns `true`.
|
|
727
687
|
*
|
|
728
|
-
* @param self - A predicate.
|
|
729
|
-
* @param that - A predicate.
|
|
730
|
-
*
|
|
731
688
|
* @example
|
|
732
689
|
* ```ts
|
|
690
|
+
* import * as assert from "node:assert"
|
|
733
691
|
* import { Predicate } from "effect"
|
|
734
692
|
*
|
|
735
693
|
* const minLength = (n: number) => (s: string) => s.length >= n
|
|
@@ -779,6 +737,7 @@ export const eqv = /*#__PURE__*/dual(2, (self, that) => a => self(a) === that(a)
|
|
|
779
737
|
*
|
|
780
738
|
* @example
|
|
781
739
|
* ```ts
|
|
740
|
+
* import * as assert from "node:assert"
|
|
782
741
|
* import { Predicate } from "effect"
|
|
783
742
|
*
|
|
784
743
|
* type Triple = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Predicate.js","names":["dual","isFunction","isFunction_","mapInput","self","f","b","isTupleOf","n","length","isTupleOfAtLeast","isTruthy","input","isSet","Set","isMap","Map","isString","isNumber","isBoolean","isBigInt","isSymbol","isUndefined","undefined","isNotUndefined","isNull","isNotNull","isNever","_","isUnknown","isRecordOrArray","isObject","hasProperty","property","isTagged","tag","isNullable","isNotNullable","isError","Error","isUint8Array","Uint8Array","isDate","Date","isIterable","Symbol","iterator","isRecord","Array","isArray","isReadonlyRecord","isPromise","then","catch","isPromiseLike","isRegExp","RegExp","compose","ab","bc","a","product","that","all","collection","as","collectionIndex","p","productMany","rest","head","tail","tuple","elements","struct","fields","keys","Object","key","not","or","and","xor","eqv","implies","antecedent","consequent","nor","nand","every","some"],"sources":["../../src/Predicate.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,SAASA,IAAI,EAAEC,UAAU,IAAIC,WAAW,QAAQ,eAAe;AAmE/D
|
|
1
|
+
{"version":3,"file":"Predicate.js","names":["dual","isFunction","isFunction_","mapInput","self","f","b","isTupleOf","n","length","isTupleOfAtLeast","isTruthy","input","isSet","Set","isMap","Map","isString","isNumber","isBoolean","isBigInt","isSymbol","isUndefined","undefined","isNotUndefined","isNull","isNotNull","isNever","_","isUnknown","isRecordOrArray","isObject","hasProperty","property","isTagged","tag","isNullable","isNotNullable","isError","Error","isUint8Array","Uint8Array","isDate","Date","isIterable","Symbol","iterator","isRecord","Array","isArray","isReadonlyRecord","isPromise","then","catch","isPromiseLike","isRegExp","RegExp","compose","ab","bc","a","product","that","all","collection","as","collectionIndex","p","productMany","rest","head","tail","tuple","elements","struct","fields","keys","Object","key","not","or","and","xor","eqv","implies","antecedent","consequent","nor","nand","every","some"],"sources":["../../src/Predicate.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,SAASA,IAAI,EAAEC,UAAU,IAAIC,WAAW,QAAQ,eAAe;A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ED
|
@@ -88,10 +88,9 @@ export const Random = internal.randomTag;
|
|
|
88
88
|
* - Generating random UI data for visual tests.
|
|
89
89
|
* - Creating data that needs to change daily but remain the same throughout a single day, such as using a date as the seed.
|
|
90
90
|
*
|
|
91
|
-
* @param seed - The seed value used to initialize the generator.
|
|
92
|
-
*
|
|
93
91
|
* @example
|
|
94
92
|
* ```ts
|
|
93
|
+
* import * as assert from "node:assert"
|
|
95
94
|
* import { Effect, Random } from "effect"
|
|
96
95
|
*
|
|
97
96
|
* const random1 = Random.make("myseed")
|
package/dist/esm/Random.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Random.js","names":["defaultServices","internal","RandomTypeId","next","nextInt","nextBoolean","nextRange","nextIntBetween","shuffle","choice","randomWith","Random","randomTag","make"],"sources":["../../src/Random.ts"],"sourcesContent":[null],"mappings":"AAQA,OAAO,KAAKA,eAAe,MAAM,+BAA+B;AAChE,OAAO,KAAKC,QAAQ,MAAM,sBAAsB;AAGhD;;;;AAIA,OAAO,MAAMC,YAAY,GAAkBD,QAAQ,CAACC,YAAY;AA0ChE;;;;;;AAMA,OAAO,MAAMC,IAAI,GAA0BH,eAAe,CAACG,IAAI;AAE/D;;;;;;AAMA,OAAO,MAAMC,OAAO,GAA0BJ,eAAe,CAACI,OAAO;AAErE;;;;;;AAMA,OAAO,MAAMC,WAAW,GAA2BL,eAAe,CAACK,WAAW;AAE9E;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAAwDN,eAAe,CAACM,SAAS;AAEvG;;;;;;;AAOA,OAAO,MAAMC,cAAc,GAAwDP,eAAe,CAACO,cAAc;AAEjH;;;;;;AAMA,OAAO,MAAMC,OAAO,GAAgER,eAAe,CAACQ,OAAO;AAE3G;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,MAAM,GAKPT,eAAe,CAACS,MAAM;AAElC;;;;;;;AAOA,OAAO,MAAMC,UAAU,GACrBV,eAAe,CAACU,UAAU;AAE5B;;;;AAIA,OAAO,MAAMC,MAAM,GAAgCV,QAAQ,CAACW,SAAS;AAErE
|
|
1
|
+
{"version":3,"file":"Random.js","names":["defaultServices","internal","RandomTypeId","next","nextInt","nextBoolean","nextRange","nextIntBetween","shuffle","choice","randomWith","Random","randomTag","make"],"sources":["../../src/Random.ts"],"sourcesContent":[null],"mappings":"AAQA,OAAO,KAAKA,eAAe,MAAM,+BAA+B;AAChE,OAAO,KAAKC,QAAQ,MAAM,sBAAsB;AAGhD;;;;AAIA,OAAO,MAAMC,YAAY,GAAkBD,QAAQ,CAACC,YAAY;AA0ChE;;;;;;AAMA,OAAO,MAAMC,IAAI,GAA0BH,eAAe,CAACG,IAAI;AAE/D;;;;;;AAMA,OAAO,MAAMC,OAAO,GAA0BJ,eAAe,CAACI,OAAO;AAErE;;;;;;AAMA,OAAO,MAAMC,WAAW,GAA2BL,eAAe,CAACK,WAAW;AAE9E;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAAwDN,eAAe,CAACM,SAAS;AAEvG;;;;;;;AAOA,OAAO,MAAMC,cAAc,GAAwDP,eAAe,CAACO,cAAc;AAEjH;;;;;;AAMA,OAAO,MAAMC,OAAO,GAAgER,eAAe,CAACQ,OAAO;AAE3G;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,MAAM,GAKPT,eAAe,CAACS,MAAM;AAElC;;;;;;;AAOA,OAAO,MAAMC,UAAU,GACrBV,eAAe,CAACU,UAAU;AAE5B;;;;AAIA,OAAO,MAAMC,MAAM,GAAgCV,QAAQ,CAACW,SAAS;AAErE;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMC,IAAI,GAA2BZ,QAAQ,CAACY,IAAI","ignoreList":[]}
|
package/dist/esm/RcMap.js
CHANGED
|
@@ -11,10 +11,13 @@ export const TypeId = internal.TypeId;
|
|
|
11
11
|
*
|
|
12
12
|
* Complex keys can extend `Equal` and `Hash` to allow lookups by value.
|
|
13
13
|
*
|
|
14
|
+
* **Options**
|
|
15
|
+
*
|
|
16
|
+
* - `capacity`: The maximum number of resources that can be held in the map.
|
|
17
|
+
* - `idleTimeToLive`: When the reference count reaches zero, the resource will be released after this duration.
|
|
18
|
+
*
|
|
14
19
|
* @since 3.5.0
|
|
15
20
|
* @category models
|
|
16
|
-
* @param capacity The maximum number of resources that can be held in the map.
|
|
17
|
-
* @param idleTimeToLive When the reference count reaches zero, the resource will be released after this duration.
|
|
18
21
|
* @example
|
|
19
22
|
* ```ts
|
|
20
23
|
* import { Effect, RcMap } from "effect"
|
package/dist/esm/RcMap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RcMap.js","names":["internal","TypeId","make","get","keys","invalidate","touch"],"sources":["../../src/RcMap.ts"],"sourcesContent":[null],"mappings":"AAMA,OAAO,KAAKA,QAAQ,MAAM,qBAAqB;AAK/C;;;;AAIA,OAAO,MAAMC,MAAM,GAAkBD,QAAQ,CAACC,MAAM;AAgCpD
|
|
1
|
+
{"version":3,"file":"RcMap.js","names":["internal","TypeId","make","get","keys","invalidate","touch"],"sources":["../../src/RcMap.ts"],"sourcesContent":[null],"mappings":"AAMA,OAAO,KAAKA,QAAQ,MAAM,qBAAqB;AAK/C;;;;AAIA,OAAO,MAAMC,MAAM,GAAkBD,QAAQ,CAACC,MAAM;AAgCpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,OAAO,MAAMC,IAAI,GAuFbF,QAAQ,CAACE,IAAI;AAEjB;;;;AAIA,OAAO,MAAMC,GAAG,GAWZH,QAAQ,CAACG,GAAG;AAEhB;;;;AAIA,OAAO,MAAMC,IAAI,GAAkEJ,QAAQ,CAACI,IAAI;AAEhG;;;;AAIA,OAAO,MAAMC,UAAU,GAWnBL,QAAQ,CAACK,UAAU;AAEvB;;;;AAIA,OAAO,MAAMC,KAAK,GAWdN,QAAQ,CAACM,KAAK","ignoreList":[]}
|