effect 2.0.0-next.49 → 2.0.0-next.50
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/BigInt/dist/effect-BigInt.cjs.dev.js +45 -18
- package/BigInt/dist/effect-BigInt.cjs.mjs +1 -0
- package/BigInt/dist/effect-BigInt.cjs.prod.js +45 -18
- package/BigInt/dist/effect-BigInt.esm.js +46 -19
- package/Brand/dist/effect-Brand.cjs.dev.js +0 -1
- package/Brand/dist/effect-Brand.cjs.prod.js +0 -1
- package/Cache/dist/effect-Cache.cjs.dev.js +23 -23
- package/Cache/dist/effect-Cache.cjs.prod.js +23 -23
- package/Cause/dist/effect-Cause.cjs.dev.js +4 -5
- package/Cause/dist/effect-Cause.cjs.prod.js +4 -5
- package/Channel/dist/effect-Channel.cjs.dev.js +35 -35
- package/Channel/dist/effect-Channel.cjs.prod.js +35 -35
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +30 -30
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +30 -30
- package/Chunk/dist/effect-Chunk.cjs.dev.js +0 -1
- package/Chunk/dist/effect-Chunk.cjs.prod.js +0 -1
- package/Clock/dist/effect-Clock.cjs.dev.js +11 -11
- package/Clock/dist/effect-Clock.cjs.prod.js +11 -11
- package/Config/dist/effect-Config.cjs.dev.js +7 -8
- package/Config/dist/effect-Config.cjs.prod.js +7 -8
- package/ConfigError/dist/effect-ConfigError.cjs.dev.js +1 -2
- package/ConfigError/dist/effect-ConfigError.cjs.prod.js +1 -2
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +10 -10
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +10 -10
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +2 -3
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +2 -3
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +1 -2
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +1 -2
- package/Console/dist/effect-Console.cjs.dev.js +27 -27
- package/Console/dist/effect-Console.cjs.prod.js +27 -27
- package/Data/dist/effect-Data.cjs.dev.js +36 -36
- package/Data/dist/effect-Data.cjs.prod.js +36 -36
- package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +11 -11
- package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +11 -11
- package/Deferred/dist/effect-Deferred.cjs.dev.js +4 -5
- package/Deferred/dist/effect-Deferred.cjs.prod.js +4 -5
- package/Differ/dist/effect-Differ.cjs.dev.js +1 -2
- package/Differ/dist/effect-Differ.cjs.prod.js +1 -2
- package/Duration/dist/effect-Duration.cjs.dev.js +0 -1
- package/Duration/dist/effect-Duration.cjs.prod.js +0 -1
- package/Effect/dist/effect-Effect.cjs.dev.js +37 -57
- package/Effect/dist/effect-Effect.cjs.mjs +0 -2
- package/Effect/dist/effect-Effect.cjs.prod.js +37 -57
- package/Effect/dist/effect-Effect.esm.js +4 -23
- package/Either/dist/effect-Either.cjs.dev.js +1 -1
- package/Either/dist/effect-Either.cjs.prod.js +1 -1
- package/Either/dist/effect-Either.esm.js +1 -1
- package/Exit/dist/effect-Exit.cjs.dev.js +4 -5
- package/Exit/dist/effect-Exit.cjs.prod.js +4 -5
- package/Fiber/dist/effect-Fiber.cjs.dev.js +24 -24
- package/Fiber/dist/effect-Fiber.cjs.prod.js +24 -24
- package/FiberId/dist/effect-FiberId.cjs.dev.js +2 -3
- package/FiberId/dist/effect-FiberId.cjs.prod.js +2 -3
- package/FiberRef/dist/effect-FiberRef.cjs.dev.js +24 -31
- package/FiberRef/dist/effect-FiberRef.cjs.mjs +0 -1
- package/FiberRef/dist/effect-FiberRef.cjs.prod.js +24 -31
- package/FiberRef/dist/effect-FiberRef.esm.js +2 -8
- package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +5 -6
- package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +5 -6
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +6 -7
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +6 -7
- package/GroupBy/dist/effect-GroupBy.cjs.dev.js +36 -36
- package/GroupBy/dist/effect-GroupBy.cjs.prod.js +36 -36
- package/HashMap/dist/effect-HashMap.cjs.dev.js +1 -2
- package/HashMap/dist/effect-HashMap.cjs.prod.js +1 -2
- package/HashSet/dist/effect-HashSet.cjs.dev.js +1 -2
- package/HashSet/dist/effect-HashSet.cjs.prod.js +1 -2
- package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +24 -24
- package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +24 -24
- package/Layer/dist/effect-Layer.cjs.dev.js +35 -35
- package/Layer/dist/effect-Layer.cjs.mjs +2 -2
- package/Layer/dist/effect-Layer.cjs.prod.js +35 -35
- package/Layer/dist/effect-Layer.esm.js +4 -4
- package/List/dist/effect-List.cjs.dev.js +0 -1
- package/List/dist/effect-List.cjs.prod.js +0 -1
- package/LogLevel/dist/effect-LogLevel.cjs.dev.js +4 -4
- package/LogLevel/dist/effect-LogLevel.cjs.prod.js +4 -4
- package/Logger/dist/effect-Logger.cjs.dev.js +28 -28
- package/Logger/dist/effect-Logger.cjs.prod.js +28 -28
- package/Match/dist/effect-Match.cjs.dev.js +0 -1
- package/Match/dist/effect-Match.cjs.prod.js +0 -1
- package/Metric/dist/effect-Metric.cjs.dev.js +22 -22
- package/Metric/dist/effect-Metric.cjs.prod.js +22 -22
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +1 -2
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +1 -2
- package/MetricHook/dist/effect-MetricHook.cjs.dev.js +3 -3
- package/MetricHook/dist/effect-MetricHook.cjs.prod.js +3 -3
- package/MetricKey/dist/effect-MetricKey.cjs.dev.js +3 -4
- package/MetricKey/dist/effect-MetricKey.cjs.prod.js +3 -4
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +1 -2
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +1 -2
- package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +24 -24
- package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +24 -24
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +5 -5
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +5 -5
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +1 -2
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +1 -2
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +1 -2
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +1 -2
- package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +0 -1
- package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +0 -1
- package/Number/dist/effect-Number.cjs.dev.js +31 -2
- package/Number/dist/effect-Number.cjs.mjs +2 -1
- package/Number/dist/effect-Number.cjs.prod.js +31 -2
- package/Number/dist/effect-Number.esm.js +24 -3
- package/Option/dist/effect-Option.cjs.dev.js +1 -88
- package/Option/dist/effect-Option.cjs.mjs +0 -6
- package/Option/dist/effect-Option.cjs.prod.js +1 -88
- package/Option/dist/effect-Option.esm.js +2 -83
- package/Pool/dist/effect-Pool.cjs.dev.js +24 -24
- package/Pool/dist/effect-Pool.cjs.prod.js +24 -24
- package/PubSub/dist/effect-PubSub.cjs.dev.js +23 -23
- package/PubSub/dist/effect-PubSub.cjs.prod.js +23 -23
- package/Queue/dist/effect-Queue.cjs.dev.js +23 -23
- package/Queue/dist/effect-Queue.cjs.prod.js +23 -23
- package/Random/dist/effect-Random.cjs.dev.js +11 -11
- package/Random/dist/effect-Random.cjs.prod.js +11 -11
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +0 -1
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +0 -1
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +332 -90
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.mjs +15 -2
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +332 -90
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.esm.js +323 -92
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +0 -1
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +0 -1
- package/Ref/dist/effect-Ref.cjs.dev.js +5 -6
- package/Ref/dist/effect-Ref.cjs.prod.js +5 -6
- package/Reloadable/dist/effect-Reloadable.cjs.dev.js +28 -28
- package/Reloadable/dist/effect-Reloadable.cjs.prod.js +28 -28
- package/Request/dist/effect-Request.cjs.dev.js +23 -23
- package/Request/dist/effect-Request.cjs.prod.js +23 -23
- package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +30 -30
- package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +30 -30
- package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +31 -31
- package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +31 -31
- package/Resource/dist/effect-Resource.cjs.dev.js +26 -26
- package/Resource/dist/effect-Resource.cjs.prod.js +26 -26
- package/Runtime/dist/effect-Runtime.cjs.dev.js +25 -25
- package/Runtime/dist/effect-Runtime.cjs.prod.js +25 -25
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +35 -35
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +35 -35
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +2 -3
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +2 -3
- package/STM/dist/effect-STM.cjs.dev.js +38 -38
- package/STM/dist/effect-STM.cjs.prod.js +38 -38
- package/Schedule/dist/effect-Schedule.cjs.dev.js +16 -16
- package/Schedule/dist/effect-Schedule.cjs.prod.js +16 -16
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +0 -1
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +0 -1
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +0 -1
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +0 -1
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +0 -1
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +0 -1
- package/Scheduler/dist/effect-Scheduler.cjs.dev.js +4 -5
- package/Scheduler/dist/effect-Scheduler.cjs.prod.js +4 -5
- package/Scope/dist/effect-Scope.cjs.dev.js +22 -22
- package/Scope/dist/effect-Scope.cjs.prod.js +22 -22
- package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +29 -29
- package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +29 -29
- package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +26 -26
- package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +26 -26
- package/Sink/dist/effect-Sink.cjs.dev.js +33 -33
- package/Sink/dist/effect-Sink.cjs.prod.js +33 -33
- package/SortedMap/dist/effect-SortedMap.cjs.dev.js +0 -1
- package/SortedMap/dist/effect-SortedMap.cjs.prod.js +0 -1
- package/SortedSet/dist/effect-SortedSet.cjs.dev.js +0 -1
- package/SortedSet/dist/effect-SortedSet.cjs.prod.js +0 -1
- package/Stream/dist/effect-Stream.cjs.dev.js +36 -36
- package/Stream/dist/effect-Stream.cjs.prod.js +36 -36
- package/Streamable/dist/effect-Streamable.cjs.dev.js +36 -36
- package/Streamable/dist/effect-Streamable.cjs.prod.js +36 -36
- package/String/dist/effect-String.cjs.dev.js +2 -2
- package/String/dist/effect-String.cjs.prod.js +2 -2
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +41 -41
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +41 -41
- package/Supervisor/dist/effect-Supervisor.cjs.dev.js +28 -28
- package/Supervisor/dist/effect-Supervisor.cjs.prod.js +28 -28
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +25 -25
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +25 -25
- package/TArray/dist/effect-TArray.cjs.dev.js +40 -40
- package/TArray/dist/effect-TArray.cjs.prod.js +40 -40
- package/TDeferred/dist/effect-TDeferred.cjs.dev.js +39 -39
- package/TDeferred/dist/effect-TDeferred.cjs.prod.js +39 -39
- package/TMap/dist/effect-TMap.cjs.dev.js +41 -41
- package/TMap/dist/effect-TMap.cjs.prod.js +41 -41
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +38 -38
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +38 -38
- package/TPubSub/dist/effect-TPubSub.cjs.dev.js +47 -47
- package/TPubSub/dist/effect-TPubSub.cjs.prod.js +47 -47
- package/TQueue/dist/effect-TQueue.cjs.dev.js +40 -40
- package/TQueue/dist/effect-TQueue.cjs.prod.js +40 -40
- package/TRandom/dist/effect-TRandom.cjs.dev.js +40 -40
- package/TRandom/dist/effect-TRandom.cjs.prod.js +40 -40
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +46 -46
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +46 -46
- package/TRef/dist/effect-TRef.cjs.dev.js +38 -38
- package/TRef/dist/effect-TRef.cjs.prod.js +38 -38
- package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +39 -39
- package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +39 -39
- package/TSet/dist/effect-TSet.cjs.dev.js +41 -41
- package/TSet/dist/effect-TSet.cjs.prod.js +41 -41
- package/Take/dist/effect-Take.cjs.dev.js +30 -30
- package/Take/dist/effect-Take.cjs.prod.js +30 -30
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +2 -3
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +2 -3
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +16 -16
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +16 -16
- package/TestClock/dist/effect-TestClock.cjs.dev.js +27 -27
- package/TestClock/dist/effect-TestClock.cjs.prod.js +27 -27
- package/TestContext/dist/effect-TestContext.cjs.dev.js +29 -29
- package/TestContext/dist/effect-TestContext.cjs.prod.js +29 -29
- package/TestLive/dist/effect-TestLive.cjs.dev.js +11 -11
- package/TestLive/dist/effect-TestLive.cjs.prod.js +11 -11
- package/TestServices/dist/effect-TestServices.cjs.dev.js +29 -29
- package/TestServices/dist/effect-TestServices.cjs.prod.js +29 -29
- package/TestSized/dist/effect-TestSized.cjs.dev.js +4 -5
- package/TestSized/dist/effect-TestSized.cjs.prod.js +4 -5
- package/Tracer/dist/effect-Tracer.cjs.dev.js +28 -21
- package/Tracer/dist/effect-Tracer.cjs.mjs +1 -0
- package/Tracer/dist/effect-Tracer.cjs.prod.js +28 -21
- package/Tracer/dist/effect-Tracer.esm.js +8 -2
- package/dist/{Ref-23b67ad9.cjs.prod.js → Ref-00103de4.cjs.prod.js} +1 -1
- package/dist/{Ref-c75b5362.cjs.dev.js → Ref-f990026b.cjs.dev.js} +1 -1
- package/dist/{cache-7b144c1f.cjs.prod.js → cache-0b148e42.cjs.prod.js} +4 -4
- package/dist/{cache-e3d6cc01.cjs.dev.js → cache-d709d5cb.cjs.dev.js} +4 -4
- package/dist/{circular-105d525c.cjs.prod.js → circular-5b6f6504.cjs.prod.js} +10 -8
- package/dist/{circular-cbfc1699.cjs.dev.js → circular-6d2bb353.cjs.dev.js} +10 -8
- package/dist/{circular-3761aff7.cjs.prod.js → circular-952618e5.cjs.prod.js} +7 -7
- package/dist/{circular-8baf0205.cjs.dev.js → circular-aa705e70.cjs.dev.js} +7 -7
- package/dist/{config-887520b4.cjs.dev.js → config-8a7bf1ae.cjs.dev.js} +3 -3
- package/dist/{config-6a5f97fe.cjs.prod.js → config-f0bd27af.cjs.prod.js} +3 -3
- package/dist/{configProvider-8567470d.cjs.dev.js → configProvider-3d85d4ef.cjs.dev.js} +4 -4
- package/dist/{configProvider-098f7113.cjs.prod.js → configProvider-ae007b10.cjs.prod.js} +4 -4
- package/dist/{core-84667e8d.cjs.prod.js → core-473934ce.cjs.prod.js} +125 -41
- package/dist/{core-6815193e.cjs.dev.js → core-b4bf44d3.cjs.dev.js} +125 -41
- package/dist/{core-8072a539.cjs.prod.js → core-d3f4e713.cjs.prod.js} +2 -2
- package/dist/{core-e6f9fdbe.cjs.dev.js → core-dd1edd7a.cjs.dev.js} +2 -2
- package/dist/{core-effect-520abd3d.cjs.prod.js → core-effect-6666f2dc.cjs.prod.js} +20 -13
- package/dist/{core-effect-5700daea.cjs.dev.js → core-effect-f4b1aad8.cjs.dev.js} +20 -13
- package/dist/{dataSource-0ca8ef42.cjs.dev.js → dataSource-9f78e828.cjs.dev.js} +2 -2
- package/dist/{dataSource-17adc342.cjs.prod.js → dataSource-d5d7f338.cjs.prod.js} +2 -2
- package/dist/declarations/src/BigInt.d.ts +29 -3
- package/dist/declarations/src/BigInt.d.ts.map +1 -1
- package/dist/declarations/src/Channel.d.ts +0 -2
- package/dist/declarations/src/Channel.d.ts.map +1 -1
- package/dist/declarations/src/Effect.d.ts +7 -37
- package/dist/declarations/src/Effect.d.ts.map +1 -1
- package/dist/declarations/src/FiberRef.d.ts +0 -5
- package/dist/declarations/src/FiberRef.d.ts.map +1 -1
- package/dist/declarations/src/HashMap.d.ts +1 -1
- package/dist/declarations/src/Layer.d.ts +7 -10
- package/dist/declarations/src/Layer.d.ts.map +1 -1
- package/dist/declarations/src/Number.d.ts +24 -1
- package/dist/declarations/src/Number.d.ts.map +1 -1
- package/dist/declarations/src/Option.d.ts +0 -62
- package/dist/declarations/src/Option.d.ts.map +1 -1
- package/dist/declarations/src/ReadonlyRecord.d.ts +239 -79
- package/dist/declarations/src/ReadonlyRecord.d.ts.map +1 -1
- package/dist/declarations/src/Stream.d.ts +0 -2
- package/dist/declarations/src/Stream.d.ts.map +1 -1
- package/dist/declarations/src/Tracer.d.ts +6 -1
- package/dist/declarations/src/Tracer.d.ts.map +1 -1
- package/dist/{defaultServices-193b11dc.cjs.dev.js → defaultServices-6a9a2d2b.cjs.dev.js} +8 -79
- package/dist/{defaultServices-4c3bf140.cjs.prod.js → defaultServices-8ea5e664.cjs.prod.js} +8 -79
- package/dist/{fiber-cbdeec72.cjs.dev.js → fiber-3d944398.cjs.dev.js} +3 -3
- package/dist/{fiber-a1a5e429.cjs.prod.js → fiber-cbd0613f.cjs.prod.js} +3 -3
- package/dist/{fiberRefs-f631451c.cjs.prod.js → fiberRefs-99808a27.cjs.prod.js} +1 -1
- package/dist/{fiberRefs-8d2401f9.cjs.dev.js → fiberRefs-ccc37f30.cjs.dev.js} +1 -1
- package/dist/{fiberRuntime-7cb6cd44.cjs.dev.js → fiberRuntime-0c1e7478.cjs.dev.js} +17 -25
- package/dist/{fiberRuntime-4691f31b.cjs.prod.js → fiberRuntime-f1e80ca7.cjs.prod.js} +17 -25
- package/dist/{groupBy-5174c302.cjs.prod.js → groupBy-30f6e9ba.cjs.prod.js} +4 -4
- package/dist/{groupBy-239a6e6e.cjs.dev.js → groupBy-8ae74e3b.cjs.dev.js} +4 -4
- package/dist/{key-9b2f3322.cjs.prod.js → key-9c7368c8.cjs.prod.js} +1 -1
- package/dist/{key-2d4efb00.cjs.dev.js → key-e3189bbd.cjs.dev.js} +1 -1
- package/dist/{layer-d1c204db.cjs.prod.js → layer-bfb9802a.cjs.prod.js} +9 -10
- package/dist/{layer-961b15ae.cjs.dev.js → layer-c284cf0d.cjs.dev.js} +9 -10
- package/dist/{patch-1771b466.cjs.prod.js → patch-256bc574.cjs.prod.js} +1 -1
- package/dist/{patch-32cc7202.cjs.dev.js → patch-cda9b6c8.cjs.dev.js} +1 -1
- package/dist/{pathPatch-45b09159.cjs.dev.js → pathPatch-31ce8101.cjs.dev.js} +1 -1
- package/dist/{pathPatch-312bd492.cjs.prod.js → pathPatch-40b92af6.cjs.prod.js} +1 -1
- package/dist/{pool-f178fcc7.cjs.prod.js → pool-122f0fad.cjs.prod.js} +5 -5
- package/dist/{pool-3890e6ce.cjs.dev.js → pool-f6ca2038.cjs.dev.js} +5 -5
- package/dist/{query-a6b58e39.cjs.prod.js → query-5cc0ddf8.cjs.prod.js} +3 -3
- package/dist/{query-39c40fa6.cjs.dev.js → query-7bffa3c3.cjs.dev.js} +3 -3
- package/dist/{queue-4c4bdc04.cjs.dev.js → queue-4166cfdb.cjs.dev.js} +2 -2
- package/dist/{queue-5342a8d5.cjs.prod.js → queue-e326fd89.cjs.prod.js} +2 -2
- package/dist/{registry-6fbdb4e3.cjs.prod.js → registry-081e18a3.cjs.prod.js} +2 -2
- package/dist/{registry-ec8b84a2.cjs.dev.js → registry-377855a9.cjs.dev.js} +2 -2
- package/dist/{runtime-3295bc3c.cjs.prod.js → runtime-4078f059.cjs.prod.js} +5 -5
- package/dist/{runtime-43b9e2bb.cjs.dev.js → runtime-d4514ab5.cjs.dev.js} +5 -5
- package/dist/{schedule-a4be407d.cjs.dev.js → schedule-31e38871.cjs.dev.js} +3 -3
- package/dist/{schedule-6431754b.cjs.prod.js → schedule-f036b254.cjs.prod.js} +3 -3
- package/dist/{scopedRef-9032002a.cjs.dev.js → scopedRef-5ecf6468.cjs.dev.js} +6 -6
- package/dist/{scopedRef-7c2bf3f3.cjs.prod.js → scopedRef-8ce21228.cjs.prod.js} +6 -6
- package/dist/{singleProducerAsyncInput-879852ad.cjs.prod.js → singleProducerAsyncInput-8879d87c.cjs.prod.js} +1 -1
- package/dist/{singleProducerAsyncInput-82e5c80c.cjs.dev.js → singleProducerAsyncInput-ece7387b.cjs.dev.js} +1 -1
- package/dist/{sink-e4280f95.cjs.dev.js → sink-1794329b.cjs.dev.js} +4 -3
- package/dist/{sink-95371737.cjs.prod.js → sink-9208df8d.cjs.prod.js} +4 -3
- package/dist/{stm-f792171c.cjs.prod.js → stm-6ad7b384.cjs.prod.js} +3 -3
- package/dist/{stm-4bf1a928.cjs.dev.js → stm-b080be31.cjs.dev.js} +3 -3
- package/dist/{stream-c498ce8a.cjs.dev.js → stream-09aeeac3.cjs.dev.js} +5 -5
- package/dist/{stream-254329d0.cjs.prod.js → stream-e19805ca.cjs.prod.js} +5 -5
- package/dist/{synchronizedRef-cfe99d53.cjs.dev.js → synchronizedRef-8fa16866.cjs.dev.js} +1 -1
- package/dist/{synchronizedRef-5420532c.cjs.prod.js → synchronizedRef-cc04ecbd.cjs.prod.js} +1 -1
- package/dist/{tArray-7f227674.cjs.prod.js → tArray-5e42c290.cjs.prod.js} +3 -3
- package/dist/{tArray-996f4aba.cjs.dev.js → tArray-7d470ed7.cjs.dev.js} +3 -3
- package/dist/{tMap-811797bf.cjs.prod.js → tMap-a2cfde88.cjs.prod.js} +4 -4
- package/dist/{tMap-b9665a82.cjs.dev.js → tMap-f0df0ea0.cjs.dev.js} +4 -4
- package/dist/{tQueue-0c15312e.cjs.dev.js → tQueue-085f70b5.cjs.dev.js} +3 -3
- package/dist/{tQueue-8a6a0244.cjs.prod.js → tQueue-b80e940e.cjs.prod.js} +3 -3
- package/dist/{tRef-44d17d07.cjs.dev.js → tRef-2e495254.cjs.dev.js} +1 -1
- package/dist/{tRef-2892ee02.cjs.prod.js → tRef-42a212cb.cjs.prod.js} +1 -1
- package/internal/cache.esm.js +1 -1
- package/internal/channel.esm.js +3 -2
- package/internal/core-effect.esm.js +18 -11
- package/internal/core.esm.js +52 -41
- package/internal/fiberRuntime.esm.js +7 -14
- package/internal/layer/circular.esm.js +9 -6
- package/internal/layer.esm.js +3 -3
- package/internal/sink.esm.js +1 -1
- package/internal/stream.esm.js +6 -6
- package/internal/tracer.esm.js +7 -4
- package/package.json +1 -1
- package/src/BigInt.ts +51 -17
- package/src/Channel.ts +0 -2
- package/src/Effect.ts +9 -44
- package/src/Either.ts +1 -1
- package/src/FiberRef.ts +0 -6
- package/src/HashMap.ts +1 -1
- package/src/Layer.ts +7 -10
- package/src/Number.ts +29 -1
- package/src/Option.ts +1 -94
- package/src/ReadonlyRecord.ts +383 -110
- package/src/Stream.ts +0 -2
- package/src/Tracer.ts +6 -1
- package/src/internal/channel.ts +14 -5
- package/src/internal/core-effect.ts +34 -24
- package/src/internal/core.ts +83 -70
- package/src/internal/fiberRuntime.ts +4 -29
- package/src/internal/layer/circular.ts +10 -13
- package/src/internal/layer.ts +8 -8
- package/src/internal/stream.ts +3 -5
- package/src/internal/tracer.ts +7 -3
- /package/dist/{FiberId-54d8bd67.cjs.prod.js → FiberId-0f0b7779.cjs.prod.js} +0 -0
- /package/dist/{FiberId-6708cdca.cjs.dev.js → FiberId-6595cf4c.cjs.dev.js} +0 -0
- /package/dist/{HashSet-86613304.cjs.prod.js → HashSet-251c8294.cjs.prod.js} +0 -0
- /package/dist/{HashSet-dd020cb0.cjs.dev.js → HashSet-c12c037b.cjs.dev.js} +0 -0
- /package/dist/{RuntimeFlagsPatch-35ed8dee.cjs.prod.js → RuntimeFlagsPatch-3890e860.cjs.prod.js} +0 -0
- /package/dist/{RuntimeFlagsPatch-9cbc441d.cjs.dev.js → RuntimeFlagsPatch-7d62915d.cjs.dev.js} +0 -0
- /package/dist/{boundaries-6eea221f.cjs.dev.js → boundaries-8dfe50cb.cjs.dev.js} +0 -0
- /package/dist/{boundaries-26f0dc82.cjs.prod.js → boundaries-ebe66d32.cjs.prod.js} +0 -0
- /package/dist/{configError-a824b415.cjs.dev.js → configError-0c09b93c.cjs.dev.js} +0 -0
- /package/dist/{configError-856c7153.cjs.prod.js → configError-9021016b.cjs.prod.js} +0 -0
- /package/dist/{configSecret-663cfb59.cjs.prod.js → configSecret-0bdfadd8.cjs.prod.js} +0 -0
- /package/dist/{configSecret-23cf1a3f.cjs.dev.js → configSecret-938818ad.cjs.dev.js} +0 -0
- /package/dist/{hook-8e8bee6a.cjs.dev.js → hook-ad5af092.cjs.dev.js} +0 -0
- /package/dist/{hook-c2815d51.cjs.prod.js → hook-cab99f9e.cjs.prod.js} +0 -0
- /package/dist/{keyType-4ec0b247.cjs.prod.js → keyType-2ae6a00e.cjs.prod.js} +0 -0
- /package/dist/{keyType-f30c9fa4.cjs.dev.js → keyType-36962f62.cjs.dev.js} +0 -0
- /package/dist/{take-981a87eb.cjs.prod.js → take-114476e5.cjs.prod.js} +0 -0
- /package/dist/{take-bfd0a3ed.cjs.dev.js → take-d4fa1beb.cjs.dev.js} +0 -0
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var Either_dist_effectEither = require('../../Either/dist/effect-Either.cjs.dev.js');
|
|
6
|
+
var Equal_dist_effectEqual = require('../../Equal/dist/effect-Equal.cjs.dev.js');
|
|
6
7
|
var Function_dist_effectFunction = require('../../Function/dist/effect-Function.cjs.dev.js');
|
|
7
8
|
var Option_dist_effectOption = require('../../Option/dist/effect-Option.cjs.dev.js');
|
|
8
9
|
require('../../Equivalence/dist/effect-Equivalence.cjs.dev.js');
|
|
9
10
|
require('../../dist/Either-e7500e90.cjs.dev.js');
|
|
10
|
-
require('../../Equal/dist/effect-Equal.cjs.dev.js');
|
|
11
11
|
require('../../Hash/dist/effect-Hash.cjs.dev.js');
|
|
12
12
|
require('../../GlobalValue/dist/effect-GlobalValue.cjs.dev.js');
|
|
13
13
|
require('../../Utils/dist/effect-Utils.cjs.dev.js');
|
|
@@ -16,7 +16,6 @@ require('../../Inspectable/dist/effect-Inspectable.cjs.dev.js');
|
|
|
16
16
|
require('../../dist/Option-01caa9d4.cjs.dev.js');
|
|
17
17
|
require('../../dist/Effectable-71c10ab9.cjs.dev.js');
|
|
18
18
|
require('../../Pipeable/dist/effect-Pipeable.cjs.dev.js');
|
|
19
|
-
require('../../Number/dist/effect-Number.cjs.dev.js');
|
|
20
19
|
require('../../Order/dist/effect-Order.cjs.dev.js');
|
|
21
20
|
|
|
22
21
|
/**
|
|
@@ -25,21 +24,16 @@ require('../../Order/dist/effect-Order.cjs.dev.js');
|
|
|
25
24
|
* @since 2.0.0
|
|
26
25
|
*/
|
|
27
26
|
|
|
28
|
-
// -------------------------------------------------------------------------------------
|
|
29
|
-
// models
|
|
30
|
-
// -------------------------------------------------------------------------------------
|
|
31
|
-
|
|
32
27
|
/**
|
|
33
28
|
* @category models
|
|
34
29
|
* @since 2.0.0
|
|
35
30
|
*/
|
|
31
|
+
|
|
36
32
|
/**
|
|
37
33
|
* @category type lambdas
|
|
38
34
|
* @since 2.0.0
|
|
39
35
|
*/
|
|
40
|
-
|
|
41
|
-
// constructors
|
|
42
|
-
// -------------------------------------------------------------------------------------
|
|
36
|
+
|
|
43
37
|
/**
|
|
44
38
|
* Creates a new, empty record.
|
|
45
39
|
*
|
|
@@ -48,14 +42,10 @@ require('../../Order/dist/effect-Order.cjs.dev.js');
|
|
|
48
42
|
*/
|
|
49
43
|
const empty = () => ({});
|
|
50
44
|
|
|
51
|
-
// -------------------------------------------------------------------------------------
|
|
52
|
-
// guards
|
|
53
|
-
// -------------------------------------------------------------------------------------
|
|
54
|
-
|
|
55
45
|
/**
|
|
56
|
-
* Determine if a
|
|
46
|
+
* Determine if a record is empty.
|
|
57
47
|
*
|
|
58
|
-
* @param self -
|
|
48
|
+
* @param self - record to test for emptiness.
|
|
59
49
|
*
|
|
60
50
|
* @example
|
|
61
51
|
* import { isEmptyRecord } from "effect/ReadonlyRecord"
|
|
@@ -76,9 +66,9 @@ const isEmptyRecord = self => {
|
|
|
76
66
|
};
|
|
77
67
|
|
|
78
68
|
/**
|
|
79
|
-
* Determine if a
|
|
69
|
+
* Determine if a record is empty.
|
|
80
70
|
*
|
|
81
|
-
* @param self -
|
|
71
|
+
* @param self - record to test for emptiness.
|
|
82
72
|
*
|
|
83
73
|
* @example
|
|
84
74
|
* import { isEmptyReadonlyRecord } from "effect/ReadonlyRecord"
|
|
@@ -91,10 +81,6 @@ const isEmptyRecord = self => {
|
|
|
91
81
|
*/
|
|
92
82
|
const isEmptyReadonlyRecord = isEmptyRecord;
|
|
93
83
|
|
|
94
|
-
// -------------------------------------------------------------------------------------
|
|
95
|
-
// conversions
|
|
96
|
-
// -------------------------------------------------------------------------------------
|
|
97
|
-
|
|
98
84
|
/**
|
|
99
85
|
* Takes an iterable and a projection function and returns a record.
|
|
100
86
|
* The projection function maps each value of the iterable to a tuple of a key and a value, which is then added to the resulting record.
|
|
@@ -103,7 +89,7 @@ const isEmptyReadonlyRecord = isEmptyRecord;
|
|
|
103
89
|
* @param f - A projection function that maps values of the iterable to a tuple of a key and a value.
|
|
104
90
|
*
|
|
105
91
|
* @example
|
|
106
|
-
* import { fromIterable } from
|
|
92
|
+
* import { fromIterable } from "effect/ReadonlyRecord"
|
|
107
93
|
*
|
|
108
94
|
* const input = [1, 2, 3, 4]
|
|
109
95
|
*
|
|
@@ -133,7 +119,7 @@ const fromIterable = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f)
|
|
|
133
119
|
* @param self - The iterable of key-value pairs.
|
|
134
120
|
*
|
|
135
121
|
* @example
|
|
136
|
-
* import { fromEntries } from
|
|
122
|
+
* import { fromEntries } from "effect/ReadonlyRecord"
|
|
137
123
|
*
|
|
138
124
|
* const input: Array<[string, number]> = [["a", 1], ["b", 2]]
|
|
139
125
|
*
|
|
@@ -145,10 +131,10 @@ const fromIterable = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f)
|
|
|
145
131
|
const fromEntries = /*#__PURE__*/fromIterable(Function_dist_effectFunction.identity);
|
|
146
132
|
|
|
147
133
|
/**
|
|
148
|
-
* Transforms the values of a
|
|
134
|
+
* Transforms the values of a record into an `Array` with a custom mapping function.
|
|
149
135
|
*
|
|
150
|
-
* @param self - The
|
|
151
|
-
* @param f - The custom mapping function to apply to each key/value of the
|
|
136
|
+
* @param self - The record to transform.
|
|
137
|
+
* @param f - The custom mapping function to apply to each key/value of the record.
|
|
152
138
|
*
|
|
153
139
|
* @example
|
|
154
140
|
* import { collect } from "effect/ReadonlyRecord"
|
|
@@ -184,31 +170,9 @@ const collect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
|
184
170
|
const toEntries = /*#__PURE__*/collect((key, value) => [key, value]);
|
|
185
171
|
|
|
186
172
|
/**
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
* Alias of {@link toEntries}.
|
|
190
|
-
*
|
|
191
|
-
* @param self - The record to transform.
|
|
192
|
-
*
|
|
193
|
-
* @example
|
|
194
|
-
* import { toArray } from "effect/ReadonlyRecord"
|
|
195
|
-
*
|
|
196
|
-
* const x = { a: 1, b: 2, c: 3 }
|
|
197
|
-
* assert.deepStrictEqual(toArray(x), [["a", 1], ["b", 2], ["c", 3]])
|
|
198
|
-
*
|
|
199
|
-
* @category conversions
|
|
200
|
-
* @since 2.0.0
|
|
201
|
-
*/
|
|
202
|
-
const toArray = toEntries;
|
|
203
|
-
|
|
204
|
-
// -------------------------------------------------------------------------------------
|
|
205
|
-
// utils
|
|
206
|
-
// -------------------------------------------------------------------------------------
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Returns the number of key/value pairs in a `ReadonlyRecord`.
|
|
173
|
+
* Returns the number of key/value pairs in a record.
|
|
210
174
|
*
|
|
211
|
-
* @param self - A
|
|
175
|
+
* @param self - A record to calculate the number of key/value pairs in.
|
|
212
176
|
*
|
|
213
177
|
* @example
|
|
214
178
|
* import { size } from "effect/ReadonlyRecord";
|
|
@@ -220,13 +184,13 @@ const toArray = toEntries;
|
|
|
220
184
|
const size = self => Object.keys(self).length;
|
|
221
185
|
|
|
222
186
|
/**
|
|
223
|
-
* Check if a given `key` exists in a
|
|
187
|
+
* Check if a given `key` exists in a record.
|
|
224
188
|
*
|
|
225
|
-
* @param self - the
|
|
226
|
-
* @param key - the key to look for in the
|
|
189
|
+
* @param self - the record to look in.
|
|
190
|
+
* @param key - the key to look for in the record.
|
|
227
191
|
*
|
|
228
192
|
* @example
|
|
229
|
-
* import { has } from
|
|
193
|
+
* import { has } from "effect/ReadonlyRecord"
|
|
230
194
|
*
|
|
231
195
|
* assert.deepStrictEqual(has({ a: 1, b: 2 }, "a"), true);
|
|
232
196
|
* assert.deepStrictEqual(has({ a: 1, b: 2 }, "c"), false);
|
|
@@ -236,10 +200,10 @@ const size = self => Object.keys(self).length;
|
|
|
236
200
|
const has = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, key) => Object.prototype.hasOwnProperty.call(self, key));
|
|
237
201
|
|
|
238
202
|
/**
|
|
239
|
-
* Retrieve a value at a particular key from a
|
|
203
|
+
* Retrieve a value at a particular key from a record, returning it wrapped in an `Option`.
|
|
240
204
|
*
|
|
241
|
-
* @param self - The
|
|
242
|
-
* @param key - Key to retrieve from
|
|
205
|
+
* @param self - The record to retrieve value from.
|
|
206
|
+
* @param key - Key to retrieve from record.
|
|
243
207
|
*
|
|
244
208
|
* @example
|
|
245
209
|
* import { get } from "effect/ReadonlyRecord"
|
|
@@ -258,7 +222,7 @@ const get = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, key) => has
|
|
|
258
222
|
* Apply a function to the element at the specified key, creating a new record,
|
|
259
223
|
* or return `None` if the key doesn't exist.
|
|
260
224
|
*
|
|
261
|
-
* @param self - The
|
|
225
|
+
* @param self - The record to be updated.
|
|
262
226
|
* @param key - The key of the element to modify.
|
|
263
227
|
* @param f - The function to apply to the element.
|
|
264
228
|
*
|
|
@@ -293,7 +257,7 @@ const modifyOption = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, ke
|
|
|
293
257
|
/**
|
|
294
258
|
* Replaces a value in the record with the new value passed as parameter.
|
|
295
259
|
*
|
|
296
|
-
* @param self - The
|
|
260
|
+
* @param self - The record to be updated.
|
|
297
261
|
* @param key - The key to search for in the record.
|
|
298
262
|
* @param b - The new value to replace the existing value with.
|
|
299
263
|
*
|
|
@@ -312,13 +276,13 @@ const modifyOption = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, ke
|
|
|
312
276
|
const replaceOption = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, key, b) => modifyOption(self, key, () => b));
|
|
313
277
|
|
|
314
278
|
/**
|
|
315
|
-
* Removes a key from a
|
|
279
|
+
* Removes a key from a record and returns a new record
|
|
316
280
|
*
|
|
317
|
-
* @param self - the
|
|
318
|
-
* @param key - the key to remove from the
|
|
281
|
+
* @param self - the record to remove the key from.
|
|
282
|
+
* @param key - the key to remove from the record.
|
|
319
283
|
*
|
|
320
284
|
* @example
|
|
321
|
-
* import { remove } from
|
|
285
|
+
* import { remove } from "effect/ReadonlyRecord"
|
|
322
286
|
*
|
|
323
287
|
* assert.deepStrictEqual(remove({ a: 1, b: 2 }, "a"), { b: 2 })
|
|
324
288
|
*
|
|
@@ -333,15 +297,15 @@ const remove = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, key) =>
|
|
|
333
297
|
});
|
|
334
298
|
|
|
335
299
|
/**
|
|
336
|
-
* Retrieves the value of the property with the given `key` from a
|
|
337
|
-
* of a tuple with the value and the
|
|
300
|
+
* Retrieves the value of the property with the given `key` from a record and returns an `Option`
|
|
301
|
+
* of a tuple with the value and the record with the removed property.
|
|
338
302
|
* If the key is not present, returns `O.none`.
|
|
339
303
|
*
|
|
340
|
-
* @param self - The input
|
|
304
|
+
* @param self - The input record.
|
|
341
305
|
* @param key - The key of the property to retrieve.
|
|
342
306
|
*
|
|
343
307
|
* @example
|
|
344
|
-
* import { pop } from
|
|
308
|
+
* import { pop } from "effect/ReadonlyRecord"
|
|
345
309
|
* import { some, none } from 'effect/Option'
|
|
346
310
|
*
|
|
347
311
|
* assert.deepStrictEqual(pop({ a: 1, b: 2 }, "a"), some([1, { b: 2 }]))
|
|
@@ -353,10 +317,10 @@ const remove = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, key) =>
|
|
|
353
317
|
const pop = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, key) => has(self, key) ? Option_dist_effectOption.some([self[key], remove(self, key)]) : Option_dist_effectOption.none());
|
|
354
318
|
|
|
355
319
|
/**
|
|
356
|
-
* Maps a
|
|
320
|
+
* Maps a record into another record by applying a transformation function to each of its values.
|
|
357
321
|
*
|
|
358
|
-
* @param self - The
|
|
359
|
-
* @param f - A transformation function that will be applied to each of the values in the
|
|
322
|
+
* @param self - The record to be mapped.
|
|
323
|
+
* @param f - A transformation function that will be applied to each of the values in the record.
|
|
360
324
|
*
|
|
361
325
|
* @example
|
|
362
326
|
* import { map } from "effect/ReadonlyRecord"
|
|
@@ -380,14 +344,14 @@ const map = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
|
380
344
|
});
|
|
381
345
|
|
|
382
346
|
/**
|
|
383
|
-
* Transforms a
|
|
384
|
-
* If the function returns `Some`, the key-value pair is included in the output
|
|
347
|
+
* Transforms a record into a record by applying the function `f` to each key and value in the original record.
|
|
348
|
+
* If the function returns `Some`, the key-value pair is included in the output record.
|
|
385
349
|
*
|
|
386
|
-
* @param self - The input
|
|
350
|
+
* @param self - The input record.
|
|
387
351
|
* @param f - The transformation function.
|
|
388
352
|
*
|
|
389
353
|
* @example
|
|
390
|
-
* import { filterMap } from
|
|
354
|
+
* import { filterMap } from "effect/ReadonlyRecord"
|
|
391
355
|
* import { some, none } from 'effect/Option'
|
|
392
356
|
*
|
|
393
357
|
* const x = { a: 1, b: 2, c: 3 }
|
|
@@ -410,11 +374,11 @@ const filterMap = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) =>
|
|
|
410
374
|
/**
|
|
411
375
|
* Selects properties from a record whose values match the given predicate.
|
|
412
376
|
*
|
|
413
|
-
* @param self - The
|
|
377
|
+
* @param self - The record to filter.
|
|
414
378
|
* @param predicate - A function that returns a `boolean` value to determine if the entry should be included in the new record.
|
|
415
379
|
*
|
|
416
380
|
* @example
|
|
417
|
-
* import { filter } from
|
|
381
|
+
* import { filter } from "effect/ReadonlyRecord"
|
|
418
382
|
*
|
|
419
383
|
* const x = { a: 1, b: 2, c: 3, d: 4 }
|
|
420
384
|
* assert.deepStrictEqual(filter(x, (n) => n > 2), { c: 3, d: 4 })
|
|
@@ -433,12 +397,12 @@ const filter = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicat
|
|
|
433
397
|
});
|
|
434
398
|
|
|
435
399
|
/**
|
|
436
|
-
* Given a
|
|
400
|
+
* Given a record with `Option` values, returns a record with only the `Some` values, with the same keys.
|
|
437
401
|
*
|
|
438
|
-
* @param self - A
|
|
402
|
+
* @param self - A record with `Option` values.
|
|
439
403
|
*
|
|
440
404
|
* @example
|
|
441
|
-
* import { compact } from
|
|
405
|
+
* import { compact } from "effect/ReadonlyRecord"
|
|
442
406
|
* import { some, none } from 'effect/Option'
|
|
443
407
|
*
|
|
444
408
|
* assert.deepStrictEqual(
|
|
@@ -452,13 +416,13 @@ const filter = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicat
|
|
|
452
416
|
const compact = /*#__PURE__*/filterMap(Function_dist_effectFunction.identity);
|
|
453
417
|
|
|
454
418
|
/**
|
|
455
|
-
* Partitions the elements of a
|
|
419
|
+
* Partitions the elements of a record into two groups: those that match a predicate, and those that don't.
|
|
456
420
|
*
|
|
457
|
-
* @param self - The
|
|
421
|
+
* @param self - The record to partition.
|
|
458
422
|
* @param f - The predicate function to apply to each element.
|
|
459
423
|
*
|
|
460
424
|
* @example
|
|
461
|
-
* import { partitionMap } from
|
|
425
|
+
* import { partitionMap } from "effect/ReadonlyRecord"
|
|
462
426
|
* import { left, right } from 'effect/Either'
|
|
463
427
|
*
|
|
464
428
|
* const x = { a: 1, b: 2, c: 3 }
|
|
@@ -483,13 +447,13 @@ const partitionMap = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f)
|
|
|
483
447
|
});
|
|
484
448
|
|
|
485
449
|
/**
|
|
486
|
-
* Partitions a
|
|
450
|
+
* Partitions a record of `Either` values into two separate records,
|
|
487
451
|
* one with the `Left` values and one with the `Right` values.
|
|
488
452
|
*
|
|
489
|
-
* @param self - the
|
|
453
|
+
* @param self - the record to partition.
|
|
490
454
|
*
|
|
491
455
|
* @example
|
|
492
|
-
* import { separate } from
|
|
456
|
+
* import { separate } from "effect/ReadonlyRecord"
|
|
493
457
|
* import { left, right } from 'effect/Either'
|
|
494
458
|
*
|
|
495
459
|
* assert.deepStrictEqual(
|
|
@@ -503,13 +467,13 @@ const partitionMap = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f)
|
|
|
503
467
|
const separate = /*#__PURE__*/partitionMap(Function_dist_effectFunction.identity);
|
|
504
468
|
|
|
505
469
|
/**
|
|
506
|
-
* Partitions a
|
|
470
|
+
* Partitions a record into two separate records based on the result of a predicate function.
|
|
507
471
|
*
|
|
508
|
-
* @param self - The input
|
|
509
|
-
* @param predicate - The partitioning function to determine the partitioning of each value of the
|
|
472
|
+
* @param self - The input record to partition.
|
|
473
|
+
* @param predicate - The partitioning function to determine the partitioning of each value of the record.
|
|
510
474
|
*
|
|
511
475
|
* @example
|
|
512
|
-
* import { partition } from
|
|
476
|
+
* import { partition } from "effect/ReadonlyRecord"
|
|
513
477
|
*
|
|
514
478
|
* assert.deepStrictEqual(
|
|
515
479
|
* partition({ a: 1, b: 3 }, (n) => n > 2),
|
|
@@ -532,25 +496,303 @@ const partition = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predi
|
|
|
532
496
|
return [left, right];
|
|
533
497
|
});
|
|
534
498
|
|
|
499
|
+
/**
|
|
500
|
+
* Retrieve the keys of a given record as an array.
|
|
501
|
+
*
|
|
502
|
+
* @param self - The object for which you want to get the keys.
|
|
503
|
+
*
|
|
504
|
+
* @since 2.0.0
|
|
505
|
+
*/
|
|
506
|
+
const keys = self => Object.keys(self);
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Retrieve the values of a given record as an array.
|
|
510
|
+
*
|
|
511
|
+
* @param self - The object for which you want to get the values.
|
|
512
|
+
*
|
|
513
|
+
* @since 2.0.0
|
|
514
|
+
*/
|
|
515
|
+
const values = self => collect(self, (_, a) => a);
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Add a new key-value pair or update an existing key's value in a record.
|
|
519
|
+
*
|
|
520
|
+
* @param self - The record to which you want to add or update a key-value pair.
|
|
521
|
+
* @param key - The key you want to add or update.
|
|
522
|
+
* @param values - The value you want to associate with the key.
|
|
523
|
+
*
|
|
524
|
+
* @example
|
|
525
|
+
* import { upsert } from "effect/ReadonlyRecord"
|
|
526
|
+
*
|
|
527
|
+
* assert.deepStrictEqual(upsert("a", 5)({ a: 1, b: 2 }), { a: 5, b: 2 });
|
|
528
|
+
* assert.deepStrictEqual(upsert("c", 5)({ a: 1, b: 2 }), { a: 1, b: 2, c: 5 });
|
|
529
|
+
*
|
|
530
|
+
* @since 2.0.0
|
|
531
|
+
*/
|
|
532
|
+
const upsert = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, key, value) => {
|
|
533
|
+
const out = {
|
|
534
|
+
...self
|
|
535
|
+
};
|
|
536
|
+
out[key] = value;
|
|
537
|
+
return out;
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Replace a key's value in a record and return the updated record.
|
|
542
|
+
*
|
|
543
|
+
* @param self - The original record.
|
|
544
|
+
* @param key - The key to replace.
|
|
545
|
+
* @param value - The new value to associate with the key.
|
|
546
|
+
*
|
|
547
|
+
* @example
|
|
548
|
+
* import { update } from "effect/ReadonlyRecord"
|
|
549
|
+
* import { some, none } from "effect/Option"
|
|
550
|
+
*
|
|
551
|
+
* assert.deepStrictEqual(update("a", 3)({ a: 1, b: 2 }), { a: 3, b: 2 });
|
|
552
|
+
* assert.deepStrictEqual(update("c", 3)({ a: 1, b: 2 }), { a: 1, b: 2 });
|
|
553
|
+
*
|
|
554
|
+
* @since 2.0.0
|
|
555
|
+
*/
|
|
556
|
+
const update = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, key, value) => {
|
|
557
|
+
const out = {
|
|
558
|
+
...self
|
|
559
|
+
};
|
|
560
|
+
if (has(self, key)) {
|
|
561
|
+
out[key] = value;
|
|
562
|
+
}
|
|
563
|
+
return out;
|
|
564
|
+
});
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Check if all the keys and values in one record are also found in another record.
|
|
568
|
+
*
|
|
569
|
+
* @param self - The first record to check.
|
|
570
|
+
* @param that - The second record to compare against.
|
|
571
|
+
* @param equivalence - A function to compare values.
|
|
572
|
+
*
|
|
573
|
+
* @since 2.0.0
|
|
574
|
+
*/
|
|
575
|
+
const isSubrecordBy = equivalence => Function_dist_effectFunction.dual(2, (self, that) => {
|
|
576
|
+
for (const key in self) {
|
|
577
|
+
if (!has(that, key) || !equivalence(self[key], that[key])) {
|
|
578
|
+
return false;
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
return true;
|
|
582
|
+
});
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Check if one record is a subrecord of another, meaning it contains all the keys and values found in the second record.
|
|
586
|
+
* This comparison uses default equality checks (`Equal.equivalence()`).
|
|
587
|
+
*
|
|
588
|
+
* @param self - The first record to check.
|
|
589
|
+
* @param that - The second record to compare against.
|
|
590
|
+
*
|
|
591
|
+
* @since 2.0.0
|
|
592
|
+
*/
|
|
593
|
+
const isSubrecord = /*#__PURE__*/isSubrecordBy( /*#__PURE__*/Equal_dist_effectEqual.equivalence());
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Reduce a record to a single value by combining its entries with a specified function.
|
|
597
|
+
*
|
|
598
|
+
* @param self - The record to reduce.
|
|
599
|
+
* @param zero - The initial value of the accumulator.
|
|
600
|
+
* @param f - The function to combine entries (accumulator, value, key).
|
|
601
|
+
*
|
|
602
|
+
* @category folding
|
|
603
|
+
* @since 2.0.0
|
|
604
|
+
*/
|
|
605
|
+
const reduce = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, zero, f) => {
|
|
606
|
+
let out = zero;
|
|
607
|
+
for (const key in self) {
|
|
608
|
+
out = f(out, self[key], key);
|
|
609
|
+
}
|
|
610
|
+
return out;
|
|
611
|
+
});
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Check if all entries in a record meet a specific condition.
|
|
615
|
+
*
|
|
616
|
+
* @param self - The record to check.
|
|
617
|
+
* @param predicate - The condition to test entries (value, key).
|
|
618
|
+
*
|
|
619
|
+
* @since 2.0.0
|
|
620
|
+
*/
|
|
621
|
+
const every = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
622
|
+
for (const key in self) {
|
|
623
|
+
if (!predicate(self[key], key)) {
|
|
624
|
+
return false;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
return true;
|
|
628
|
+
});
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* Check if any entry in a record meets a specific condition.
|
|
632
|
+
*
|
|
633
|
+
* @param self - The record to check.
|
|
634
|
+
* @param predicate - The condition to test entries (value, key).
|
|
635
|
+
*
|
|
636
|
+
* @since 2.0.0
|
|
637
|
+
*/
|
|
638
|
+
const some = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
639
|
+
for (const key in self) {
|
|
640
|
+
if (predicate(self[key], key)) {
|
|
641
|
+
return true;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
return false;
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Merge two records, preserving entries that exist in either of the records.
|
|
649
|
+
*
|
|
650
|
+
* @param self - The first record.
|
|
651
|
+
* @param that - The second record to combine with the first.
|
|
652
|
+
* @param combine - A function to specify how to merge entries with the same key.
|
|
653
|
+
*
|
|
654
|
+
* @since 2.0.0
|
|
655
|
+
*/
|
|
656
|
+
const union = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, that, combine) => {
|
|
657
|
+
if (isEmptyRecord(self)) {
|
|
658
|
+
return {
|
|
659
|
+
...that
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
if (isEmptyRecord(that)) {
|
|
663
|
+
return {
|
|
664
|
+
...self
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
const out = {};
|
|
668
|
+
for (const key in self) {
|
|
669
|
+
if (has(that, key)) {
|
|
670
|
+
out[key] = combine(self[key], that[key]);
|
|
671
|
+
} else {
|
|
672
|
+
out[key] = self[key];
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
for (const key in that) {
|
|
676
|
+
if (!has(out, key)) {
|
|
677
|
+
out[key] = that[key];
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
return out;
|
|
681
|
+
});
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* Merge two records, retaining only the entries that exist in both records.
|
|
685
|
+
*
|
|
686
|
+
* @param self - The first record.
|
|
687
|
+
* @param that - The second record to merge with the first.
|
|
688
|
+
* @param combine - A function to specify how to merge entries with the same key.
|
|
689
|
+
*
|
|
690
|
+
* @since 2.0.0
|
|
691
|
+
*/
|
|
692
|
+
const intersection = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, that, combine) => {
|
|
693
|
+
if (isEmptyRecord(self) || isEmptyRecord(that)) {
|
|
694
|
+
return empty();
|
|
695
|
+
}
|
|
696
|
+
const out = {};
|
|
697
|
+
for (const key in self) {
|
|
698
|
+
if (has(that, key)) {
|
|
699
|
+
out[key] = combine(self[key], that[key]);
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
return out;
|
|
703
|
+
});
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Merge two records, preserving only the entries that are unique to each record.
|
|
707
|
+
*
|
|
708
|
+
* @param self - The first record.
|
|
709
|
+
* @param that - The second record to compare with the first.
|
|
710
|
+
*
|
|
711
|
+
* @since 2.0.0
|
|
712
|
+
*/
|
|
713
|
+
const difference = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => {
|
|
714
|
+
if (isEmptyRecord(self)) {
|
|
715
|
+
return {
|
|
716
|
+
...that
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
if (isEmptyRecord(that)) {
|
|
720
|
+
return {
|
|
721
|
+
...self
|
|
722
|
+
};
|
|
723
|
+
}
|
|
724
|
+
const out = {};
|
|
725
|
+
for (const key in self) {
|
|
726
|
+
if (!has(that, key)) {
|
|
727
|
+
out[key] = self[key];
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
for (const key in that) {
|
|
731
|
+
if (!has(self, key)) {
|
|
732
|
+
out[key] = that[key];
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
return out;
|
|
736
|
+
});
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Create an `Equivalence` for records using the provided `Equivalence` for values.
|
|
740
|
+
*
|
|
741
|
+
* @param equivalence - An `Equivalence` for the values contained in the records.
|
|
742
|
+
*
|
|
743
|
+
* @category instances
|
|
744
|
+
* @since 2.0.0
|
|
745
|
+
*/
|
|
746
|
+
const getEquivalence = equivalence => {
|
|
747
|
+
const is = isSubrecordBy(equivalence);
|
|
748
|
+
return (self, that) => is(self, that) && is(that, self);
|
|
749
|
+
};
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* Create a non-empty record from a single element.
|
|
753
|
+
*
|
|
754
|
+
* @param key - The key for the element.
|
|
755
|
+
* @param value - The value associated with the key.
|
|
756
|
+
*
|
|
757
|
+
* @category constructors
|
|
758
|
+
* @since 2.0.0
|
|
759
|
+
*/
|
|
760
|
+
const singleton = (key, value) => ({
|
|
761
|
+
[key]: value
|
|
762
|
+
});
|
|
763
|
+
|
|
535
764
|
exports.collect = collect;
|
|
536
765
|
exports.compact = compact;
|
|
766
|
+
exports.difference = difference;
|
|
537
767
|
exports.empty = empty;
|
|
768
|
+
exports.every = every;
|
|
538
769
|
exports.filter = filter;
|
|
539
770
|
exports.filterMap = filterMap;
|
|
540
771
|
exports.fromEntries = fromEntries;
|
|
541
772
|
exports.fromIterable = fromIterable;
|
|
542
773
|
exports.get = get;
|
|
774
|
+
exports.getEquivalence = getEquivalence;
|
|
543
775
|
exports.has = has;
|
|
776
|
+
exports.intersection = intersection;
|
|
544
777
|
exports.isEmptyReadonlyRecord = isEmptyReadonlyRecord;
|
|
545
778
|
exports.isEmptyRecord = isEmptyRecord;
|
|
779
|
+
exports.isSubrecord = isSubrecord;
|
|
780
|
+
exports.isSubrecordBy = isSubrecordBy;
|
|
781
|
+
exports.keys = keys;
|
|
546
782
|
exports.map = map;
|
|
547
783
|
exports.modifyOption = modifyOption;
|
|
548
784
|
exports.partition = partition;
|
|
549
785
|
exports.partitionMap = partitionMap;
|
|
550
786
|
exports.pop = pop;
|
|
787
|
+
exports.reduce = reduce;
|
|
551
788
|
exports.remove = remove;
|
|
552
789
|
exports.replaceOption = replaceOption;
|
|
553
790
|
exports.separate = separate;
|
|
791
|
+
exports.singleton = singleton;
|
|
554
792
|
exports.size = size;
|
|
555
|
-
exports.
|
|
793
|
+
exports.some = some;
|
|
556
794
|
exports.toEntries = toEntries;
|
|
795
|
+
exports.union = union;
|
|
796
|
+
exports.update = update;
|
|
797
|
+
exports.upsert = upsert;
|
|
798
|
+
exports.values = values;
|
|
@@ -1,24 +1,37 @@
|
|
|
1
1
|
export {
|
|
2
2
|
collect,
|
|
3
3
|
compact,
|
|
4
|
+
difference,
|
|
4
5
|
empty,
|
|
6
|
+
every,
|
|
5
7
|
filter,
|
|
6
8
|
filterMap,
|
|
7
9
|
fromEntries,
|
|
8
10
|
fromIterable,
|
|
9
11
|
get,
|
|
12
|
+
getEquivalence,
|
|
10
13
|
has,
|
|
14
|
+
intersection,
|
|
11
15
|
isEmptyReadonlyRecord,
|
|
12
16
|
isEmptyRecord,
|
|
17
|
+
isSubrecord,
|
|
18
|
+
isSubrecordBy,
|
|
19
|
+
keys,
|
|
13
20
|
map,
|
|
14
21
|
modifyOption,
|
|
15
22
|
partition,
|
|
16
23
|
partitionMap,
|
|
17
24
|
pop,
|
|
25
|
+
reduce,
|
|
18
26
|
remove,
|
|
19
27
|
replaceOption,
|
|
20
28
|
separate,
|
|
29
|
+
singleton,
|
|
21
30
|
size,
|
|
22
|
-
|
|
23
|
-
toEntries
|
|
31
|
+
some,
|
|
32
|
+
toEntries,
|
|
33
|
+
union,
|
|
34
|
+
update,
|
|
35
|
+
upsert,
|
|
36
|
+
values
|
|
24
37
|
} from "./effect-ReadonlyRecord.cjs.js";
|