From fc8ebf238e5d8c6d14710a4c27e2c2089f28fd40 Mon Sep 17 00:00:00 2001
From: actions
Date: Mon, 15 Jan 2024 18:02:57 +0000
Subject: [PATCH] Adding deno distribution files and moving files from /dist to
/
---
.github/FUNDING.yml | 4 -
.github/workflows/ci.yaml | 147 -
.gitignore | 48 +-
deno_dist/LICENSE | 21 +
deno_dist/README.md | 121 +
deno_dist/hooks/index.ts | 9 +
deno_dist/hooks/useEvt.ts | 51 +
deno_dist/hooks/useRerenderOnStateChange.ts | 27 +
deno_dist/lib/Ctx.ts | 166 +
deno_dist/lib/Evt.asNonPostable.ts | 7 +
deno_dist/lib/Evt.asPostable.ts | 11 +
deno_dist/lib/Evt.asyncPipe.ts | 77 +
deno_dist/lib/Evt.create.ts | 22 +
deno_dist/lib/Evt.factorize.ts | 14 +
deno_dist/lib/Evt.from.ts | 335 +
deno_dist/lib/Evt.getCtx.ts | 33 +
deno_dist/lib/Evt.loosenType.ts | 20 +
deno_dist/lib/Evt.merge.ts | 51 +
deno_dist/lib/Evt.newCtx.ts | 11 +
deno_dist/lib/Evt.parsePropsFromArgs.ts | 250 +
deno_dist/lib/Evt.ts | 1060 +
deno_dist/lib/LazyEvt.ts | 44 +
deno_dist/lib/LazyStatefulEvt.ts | 54 +
deno_dist/lib/StatefulEvt.ts | 172 +
deno_dist/lib/importProxy.ts | 14 +
deno_dist/lib/index.ts | 15 +
deno_dist/lib/types/AsyncIterableEvt.ts | 5 +
deno_dist/lib/types/EventTargetLike.ts | 141 +
deno_dist/lib/types/EvtError.ts | 18 +
deno_dist/lib/types/Handler.ts | 59 +
deno_dist/lib/types/Observer.ts | 15 +
deno_dist/lib/types/Operator.ts | 33 +
deno_dist/lib/types/helper/EvtLikeToEvt.ts | 6 +
deno_dist/lib/types/helper/FactorizeEvt.ts | 8 +
deno_dist/lib/types/helper/SwapEvtType.ts | 14 +
.../lib/types/helper/ToNonPostableEvt.ts | 19 +
deno_dist/lib/types/helper/ToPostableEvt.ts | 24 +
deno_dist/lib/types/helper/UnpackCtx.ts | 11 +
deno_dist/lib/types/helper/UnpackEvt.ts | 18 +
deno_dist/lib/types/helper/index.ts | 8 +
deno_dist/lib/types/index.ts | 11 +
deno_dist/lib/types/interfaces/Ctx.ts | 104 +
deno_dist/lib/types/interfaces/CtxLike.ts | 30 +
deno_dist/lib/types/interfaces/Evt.ts | 5 +
deno_dist/lib/types/interfaces/EvtLike.ts | 6 +
.../lib/types/interfaces/NonPostableEvt.ts | 1886 ++
.../types/interfaces/NonPostableEvtLike.ts | 7 +
deno_dist/lib/types/interfaces/Postable.ts | 19 +
deno_dist/lib/types/interfaces/StatefulEvt.ts | 10 +
.../lib/types/interfaces/StatefulEvtLike.ts | 6 +
.../lib/types/interfaces/StatefulPostable.ts | 11 +
.../types/interfaces/StatefulReadonlyEvt.ts | 163 +
.../interfaces/StatefulReadonlyEvtLike.ts | 6 +
deno_dist/lib/types/interfaces/index.ts | 12 +
deno_dist/lib/types/lib.dom.ts | 16199 ++++++++++++++++
deno_dist/lib/util/compose.ts | 165 +
.../util/convertOperatorToStatelessFLambda.ts | 54 +
deno_dist/lib/util/index.ts | 1 +
deno_dist/mod.ts | 1 +
deno_dist/operators/chunksOf.ts | 50 +
deno_dist/operators/distinct.ts | 49 +
deno_dist/operators/index.ts | 7 +
deno_dist/operators/nonNullable.ts | 10 +
deno_dist/operators/onlyIfChanged.ts | 30 +
deno_dist/operators/scan.ts | 13 +
deno_dist/operators/throttleTime.ts | 19 +
deno_dist/operators/to.ts | 30 +
deno_dist/test/getHandlerPr.ts | 24 +
deno_dist/test/index.ts | 94 +
deno_dist/test/mod.ts | 97 +
deno_dist/test/test1.ts | 33 +
deno_dist/test/test10.ts | 31 +
deno_dist/test/test100.ts | 9 +
deno_dist/test/test101.ts | 69 +
deno_dist/test/test102.ts | 69 +
deno_dist/test/test103.ts | 52 +
deno_dist/test/test104.ts | 50 +
deno_dist/test/test105.ts | 28 +
deno_dist/test/test106.ts | 77 +
deno_dist/test/test107.ts | 59 +
deno_dist/test/test108.ts | 12 +
deno_dist/test/test109.ts | 27 +
deno_dist/test/test11.ts | 35 +
deno_dist/test/test110.ts | 27 +
deno_dist/test/test12.ts | 30 +
deno_dist/test/test13.ts | 42 +
deno_dist/test/test14.ts | 48 +
deno_dist/test/test15.ts | 115 +
deno_dist/test/test16.ts | 67 +
deno_dist/test/test17.ts | 62 +
deno_dist/test/test18.ts | 43 +
deno_dist/test/test19.ts | 22 +
deno_dist/test/test2.ts | 52 +
deno_dist/test/test20.ts | 43 +
deno_dist/test/test21.ts | 53 +
deno_dist/test/test22.ts | 886 +
deno_dist/test/test23.ts | 66 +
deno_dist/test/test24.ts | 19 +
deno_dist/test/test25.ts | 78 +
deno_dist/test/test26.ts | 45 +
deno_dist/test/test27.ts | 47 +
deno_dist/test/test28.ts | 60 +
deno_dist/test/test29.ts | 65 +
deno_dist/test/test3.ts | 31 +
deno_dist/test/test30.ts | 29 +
deno_dist/test/test31.ts | 19 +
deno_dist/test/test32.ts | 61 +
deno_dist/test/test33.ts | 94 +
deno_dist/test/test34.ts | 46 +
deno_dist/test/test35.ts | 160 +
deno_dist/test/test36.ts | 20 +
deno_dist/test/test37.ts | 378 +
deno_dist/test/test38.ts | 145 +
deno_dist/test/test39.ts | 214 +
deno_dist/test/test4.ts | 29 +
deno_dist/test/test44.ts | 23 +
deno_dist/test/test49.ts | 81 +
deno_dist/test/test5.ts | 34 +
deno_dist/test/test50.ts | 24 +
deno_dist/test/test51.ts | 143 +
deno_dist/test/test52.ts | 39 +
deno_dist/test/test53.ts | 29 +
deno_dist/test/test54.ts | 19 +
deno_dist/test/test55.ts | 123 +
deno_dist/test/test56.ts | 74 +
deno_dist/test/test57.ts | 72 +
deno_dist/test/test59.ts | 58 +
deno_dist/test/test6.ts | 42 +
deno_dist/test/test60.ts | 20 +
deno_dist/test/test61.ts | 35 +
deno_dist/test/test62.ts | 235 +
deno_dist/test/test63.ts | 124 +
deno_dist/test/test64.ts | 38 +
deno_dist/test/test65.ts | 60 +
deno_dist/test/test66.ts | 30 +
deno_dist/test/test67.ts | 143 +
deno_dist/test/test68.ts | 70 +
deno_dist/test/test69.ts | 13 +
deno_dist/test/test7.ts | 28 +
deno_dist/test/test70.ts | 14 +
deno_dist/test/test71.ts | 27 +
deno_dist/test/test73.ts | 183 +
deno_dist/test/test76.ts | 97 +
deno_dist/test/test78.ts | 95 +
deno_dist/test/test79.ts | 23 +
deno_dist/test/test8.ts | 105 +
deno_dist/test/test80.ts | 19 +
deno_dist/test/test81.ts | 104 +
deno_dist/test/test82.ts | 42 +
deno_dist/test/test83.ts | 41 +
deno_dist/test/test84.ts | 17 +
deno_dist/test/test85.ts | 7 +
deno_dist/test/test86.ts | 35 +
deno_dist/test/test87.ts | 26 +
deno_dist/test/test88.ts | 17 +
deno_dist/test/test9.ts | 159 +
deno_dist/test/test90.ts | 40 +
deno_dist/test/test91.ts | 48 +
deno_dist/test/test92.ts | 31 +
deno_dist/test/test93.ts | 20 +
deno_dist/test/test94.ts | 14 +
deno_dist/test/test95.ts | 123 +
deno_dist/test/test96.ts | 18 +
deno_dist/test/test97.ts | 57 +
deno_dist/test/test98.ts | 15 +
deno_dist/test/test99.ts | 25 +
deno_dist/test/types/Evt.create.ts | 121 +
deno_dist/test/types/EvtLike.ts | 35 +
deno_dist/test/types/EvtLikeToEvt.ts | 44 +
deno_dist/test/types/README.md | 2 +
deno_dist/test/types/UnpackEvt.ts | 67 +
deno_dist/tools/Deferred.ts | 66 +
deno_dist/tools/concatUint8Array.ts | 33 +
deno_dist/tools/inDepth/copy.ts | 147 +
deno_dist/tools/inDepth/getPrototypeChain.ts | 36 +
deno_dist/tools/inDepth/index.ts | 3 +
deno_dist/tools/inDepth/same.ts | 250 +
deno_dist/tools/inDepth/test.ts | 433 +
deno_dist/tools/inDepth/types.ts | 69 +
deno_dist/tools/isCallableFunction.ts | 29 +
deno_dist/tools/minimal-polyfills/LightMap.ts | 8 +
deno_dist/tools/minimal-polyfills/LightSet.ts | 7 +
.../useEffectRunConditionToDependencyArray.ts | 77 +
deno_dist/tools/powerhooks/useEffectIf.ts | 46 +
.../tools/powerhooks/useGuaranteedMemo.ts | 21 +
deno_dist/tools/reducers/allEquals.ts | 26 +
deno_dist/tools/reducers/allEqualsTo.ts | 23 +
deno_dist/tools/reducers/allUniq.ts | 28 +
deno_dist/tools/reducers/and.ts | 14 +
deno_dist/tools/reducers/contains.ts | 28 +
deno_dist/tools/reducers/count.ts | 20 +
deno_dist/tools/reducers/diff.ts | 81 +
deno_dist/tools/reducers/every.ts | 17 +
deno_dist/tools/reducers/includes.ts | 10 +
deno_dist/tools/reducers/index.ts | 28 +
deno_dist/tools/reducers/or.ts | 16 +
deno_dist/tools/reducers/partition.ts | 47 +
deno_dist/tools/reducers/reduceify.ts | 38 +
deno_dist/tools/reducers/removeDuplicates.ts | 30 +
deno_dist/tools/reducers/sameAs.ts | 37 +
deno_dist/tools/reducers/test.ts | 195 +
deno_dist/tools/safeSetTimeout.ts | 5 +
.../tools/testing/getPromiseAssertionApi.ts | 83 +
deno_dist/tools/testing/index.ts | 1 +
deno_dist/tools/tsafe/capitalize.ts | 4 +
hooks/index.d.ts | 2 +
hooks/index.js | 15 +
hooks/index.js.map | 1 +
hooks/useEvt.d.ts | 31 +
hooks/useEvt.js | 66 +
hooks/useEvt.js.map | 1 +
hooks/useRerenderOnStateChange.d.ts | 12 +
hooks/useRerenderOnStateChange.js | 60 +
hooks/useRerenderOnStateChange.js.map | 1 +
lib/Ctx.d.ts | 5 +
lib/Ctx.js | 157 +
lib/Ctx.js.map | 1 +
lib/Evt.asNonPostable.d.ts | 3 +
lib/Evt.asNonPostable.js | 9 +
lib/Evt.asNonPostable.js.map | 1 +
lib/Evt.asPostable.d.ts | 7 +
lib/Evt.asPostable.js | 13 +
lib/Evt.asPostable.js.map | 1 +
lib/Evt.asyncPipe.d.ts | 17 +
lib/Evt.asyncPipe.js | 93 +
lib/Evt.asyncPipe.js.map | 1 +
lib/Evt.create.d.ts | 13 +
lib/Evt.create.js | 15 +
lib/Evt.create.js.map | 1 +
lib/Evt.d.ts | 39 +
lib/Evt.factorize.d.ts | 3 +
lib/Evt.factorize.js | 14 +
lib/Evt.factorize.js.map | 1 +
lib/Evt.from.d.ts | 28 +
lib/Evt.from.js | 154 +
lib/Evt.from.js.map | 1 +
lib/Evt.getCtx.d.ts | 9 +
lib/Evt.getCtx.js | 27 +
lib/Evt.getCtx.js.map | 1 +
lib/Evt.js | 872 +
lib/Evt.js.map | 1 +
lib/Evt.loosenType.d.ts | 5 +
lib/Evt.loosenType.js | 16 +
lib/Evt.loosenType.js.map | 1 +
lib/Evt.merge.d.ts | 5 +
lib/Evt.merge.js | 25 +
lib/Evt.merge.js.map | 1 +
lib/Evt.newCtx.d.ts | 7 +
lib/Evt.newCtx.js | 14 +
lib/Evt.newCtx.js.map | 1 +
lib/Evt.parsePropsFromArgs.d.ts | 3 +
lib/Evt.parsePropsFromArgs.js | 188 +
lib/Evt.parsePropsFromArgs.js.map | 1 +
lib/LazyEvt.d.ts | 9 +
lib/LazyEvt.js | 36 +
lib/LazyEvt.js.map | 1 +
lib/LazyStatefulEvt.d.ts | 11 +
lib/LazyStatefulEvt.js | 40 +
lib/LazyStatefulEvt.js.map | 1 +
lib/StatefulEvt.d.ts | 7 +
lib/StatefulEvt.js | 167 +
lib/StatefulEvt.js.map | 1 +
lib/importProxy.d.ts | 9 +
lib/importProxy.js | 6 +
lib/importProxy.js.map | 1 +
lib/index.d.ts | 9 +
lib/index.js | 36 +
lib/index.js.map | 1 +
lib/types/AsyncIterableEvt.d.ts | 4 +
lib/types/AsyncIterableEvt.js | 3 +
lib/types/AsyncIterableEvt.js.map | 1 +
lib/types/EventTargetLike.d.ts | 54 +
lib/types/EventTargetLike.js | 61 +
lib/types/EventTargetLike.js.map | 1 +
lib/types/EvtError.d.ts | 7 +
lib/types/EvtError.js | 42 +
lib/types/EvtError.js.map | 1 +
lib/types/Handler.d.ts | 46 +
lib/types/Handler.js | 3 +
lib/types/Handler.js.map | 1 +
lib/types/Observer.d.ts | 9 +
lib/types/Observer.js | 3 +
lib/types/Observer.js.map | 1 +
lib/types/Operator.d.ts | 14 +
lib/types/Operator.js | 3 +
lib/types/Operator.js.map | 1 +
lib/types/helper/EvtLikeToEvt.d.ts | 4 +
lib/types/helper/EvtLikeToEvt.js | 3 +
lib/types/helper/EvtLikeToEvt.js.map | 1 +
lib/types/helper/FactorizeEvt.d.ts | 5 +
lib/types/helper/FactorizeEvt.js | 3 +
lib/types/helper/FactorizeEvt.js.map | 1 +
lib/types/helper/SwapEvtType.d.ts | 3 +
lib/types/helper/SwapEvtType.js | 3 +
lib/types/helper/SwapEvtType.js.map | 1 +
lib/types/helper/ToNonPostableEvt.d.ts | 12 +
lib/types/helper/ToNonPostableEvt.js | 3 +
lib/types/helper/ToNonPostableEvt.js.map | 1 +
lib/types/helper/ToPostableEvt.d.ts | 12 +
lib/types/helper/ToPostableEvt.js | 3 +
lib/types/helper/ToPostableEvt.js.map | 1 +
lib/types/helper/UnpackCtx.d.ts | 5 +
lib/types/helper/UnpackCtx.js | 3 +
lib/types/helper/UnpackCtx.js.map | 1 +
lib/types/helper/UnpackEvt.d.ts | 15 +
lib/types/helper/UnpackEvt.js | 3 +
lib/types/helper/UnpackEvt.js.map | 1 +
lib/types/helper/index.d.ts | 7 +
lib/types/helper/index.js | 3 +
lib/types/helper/index.js.map | 1 +
lib/types/index.d.ts | 7 +
lib/types/index.js | 37 +
lib/types/index.js.map | 1 +
lib/types/interfaces/Ctx.d.ts | 80 +
lib/types/interfaces/Ctx.js | 3 +
lib/types/interfaces/Ctx.js.map | 1 +
lib/types/interfaces/CtxLike.d.ts | 15 +
lib/types/interfaces/CtxLike.js | 17 +
lib/types/interfaces/CtxLike.js.map | 1 +
lib/types/interfaces/Evt.d.ts | 4 +
lib/types/interfaces/Evt.js | 3 +
lib/types/interfaces/Evt.js.map | 1 +
lib/types/interfaces/EvtLike.d.ts | 4 +
lib/types/interfaces/EvtLike.js | 4 +
lib/types/interfaces/EvtLike.js.map | 1 +
lib/types/interfaces/NonPostableEvt.d.ts | 1266 ++
lib/types/interfaces/NonPostableEvt.js | 3 +
lib/types/interfaces/NonPostableEvt.js.map | 1 +
lib/types/interfaces/NonPostableEvtLike.d.ts | 5 +
lib/types/interfaces/NonPostableEvtLike.js | 4 +
.../interfaces/NonPostableEvtLike.js.map | 1 +
lib/types/interfaces/Postable.d.ts | 14 +
lib/types/interfaces/Postable.js | 3 +
lib/types/interfaces/Postable.js.map | 1 +
lib/types/interfaces/StatefulEvt.d.ts | 6 +
lib/types/interfaces/StatefulEvt.js | 4 +
lib/types/interfaces/StatefulEvt.js.map | 1 +
lib/types/interfaces/StatefulEvtLike.d.ts | 4 +
lib/types/interfaces/StatefulEvtLike.js | 4 +
lib/types/interfaces/StatefulEvtLike.js.map | 1 +
lib/types/interfaces/StatefulPostable.d.ts | 6 +
lib/types/interfaces/StatefulPostable.js | 3 +
lib/types/interfaces/StatefulPostable.js.map | 1 +
lib/types/interfaces/StatefulReadonlyEvt.d.ts | 54 +
lib/types/interfaces/StatefulReadonlyEvt.js | 3 +
.../interfaces/StatefulReadonlyEvt.js.map | 1 +
.../interfaces/StatefulReadonlyEvtLike.d.ts | 4 +
.../interfaces/StatefulReadonlyEvtLike.js | 4 +
.../interfaces/StatefulReadonlyEvtLike.js.map | 1 +
lib/types/interfaces/index.d.ts | 12 +
lib/types/interfaces/index.js | 18 +
lib/types/interfaces/index.js.map | 1 +
lib/types/lib.dom.d.ts | 14466 ++++++++++++++
lib/types/lib.dom.js | 30 +
lib/types/lib.dom.js.map | 1 +
lib/util/compose.d.ts | 22 +
lib/util/compose.js | 64 +
lib/util/compose.js.map | 1 +
.../convertOperatorToStatelessFLambda.d.ts | 2 +
lib/util/convertOperatorToStatelessFLambda.js | 39 +
.../convertOperatorToStatelessFLambda.js.map | 1 +
lib/util/index.d.ts | 1 +
lib/util/index.js | 6 +
lib/util/index.js.map | 1 +
operators/chunksOf.d.ts | 2 +
operators/chunksOf.js | 64 +
operators/chunksOf.js.map | 1 +
operators/distinct.d.ts | 7 +
operators/distinct.js | 64 +
operators/distinct.js.map | 1 +
operators/index.d.ts | 7 +
operators/index.js | 18 +
operators/index.js.map | 1 +
operators/nonNullable.d.ts | 1 +
operators/nonNullable.js | 14 +
operators/nonNullable.js.map | 1 +
operators/onlyIfChanged.d.ts | 4 +
operators/onlyIfChanged.js | 20 +
operators/onlyIfChanged.js.map | 1 +
operators/scan.d.ts | 1 +
operators/scan.js | 32 +
operators/scan.js.map | 1 +
operators/throttleTime.d.ts | 1 +
operators/throttleTime.js | 21 +
operators/throttleTime.js.map | 1 +
operators/to.d.ts | 7 +
operators/to.js | 27 +
operators/to.js.map | 1 +
package.json | 514 +-
test/getHandlerPr.d.ts | 4 +
test/getHandlerPr.js | 16 +
test/getHandlerPr.js.map | 1 +
test/index.d.ts | 1 +
test/index.js | 88 +
test/index.js.map | 1 +
test/mod.d.ts | 82 +
test/mod.js | 85 +
test/mod.js.map | 1 +
test/test1.d.ts | 1 +
test/test1.js | 24 +
test/test1.js.map | 1 +
test/test10.d.ts | 1 +
test/test10.js | 22 +
test/test10.js.map | 1 +
test/test100.d.ts | 1 +
test/test100.js | 8 +
test/test100.js.map | 1 +
test/test101.d.ts | 1 +
test/test101.js | 122 +
test/test101.js.map | 1 +
test/test102.d.ts | 1 +
test/test102.js | 122 +
test/test102.js.map | 1 +
test/test103.d.ts | 1 +
test/test103.js | 106 +
test/test103.js.map | 1 +
test/test104.d.ts | 1 +
test/test104.js | 106 +
test/test104.js.map | 1 +
test/test105.d.ts | 1 +
test/test105.js | 17 +
test/test105.js.map | 1 +
test/test106.d.ts | 1 +
test/test106.js | 141 +
test/test106.js.map | 1 +
test/test107.d.ts | 1 +
test/test107.js | 129 +
test/test107.js.map | 1 +
test/test108.d.ts | 1 +
test/test108.js | 11 +
test/test108.js.map | 1 +
test/test109.d.ts | 1 +
test/test109.js | 22 +
test/test109.js.map | 1 +
test/test11.d.ts | 1 +
test/test11.js | 24 +
test/test11.js.map | 1 +
test/test110.d.ts | 1 +
test/test110.js | 22 +
test/test110.js.map | 1 +
test/test12.d.ts | 1 +
test/test12.js | 64 +
test/test12.js.map | 1 +
test/test13.d.ts | 1 +
test/test13.js | 76 +
test/test13.js.map | 1 +
test/test14.d.ts | 1 +
test/test14.js | 74 +
test/test14.js.map | 1 +
test/test15.d.ts | 1 +
test/test15.js | 182 +
test/test15.js.map | 1 +
test/test16.d.ts | 1 +
test/test16.js | 53 +
test/test16.js.map | 1 +
test/test17.d.ts | 1 +
test/test17.js | 54 +
test/test17.js.map | 1 +
test/test18.d.ts | 1 +
test/test18.js | 22 +
test/test18.js.map | 1 +
test/test19.d.ts | 1 +
test/test19.js | 15 +
test/test19.js.map | 1 +
test/test2.d.ts | 1 +
test/test2.js | 68 +
test/test2.js.map | 1 +
test/test20.d.ts | 1 +
test/test20.js | 74 +
test/test20.js.map | 1 +
test/test21.d.ts | 1 +
test/test21.js | 123 +
test/test21.js.map | 1 +
test/test22.d.ts | 1 +
test/test22.js | 502 +
test/test22.js.map | 1 +
test/test23.d.ts | 1 +
test/test23.js | 30 +
test/test23.js.map | 1 +
test/test24.d.ts | 1 +
test/test24.js | 13 +
test/test24.js.map | 1 +
test/test25.d.ts | 1 +
test/test25.js | 108 +
test/test25.js.map | 1 +
test/test26.d.ts | 1 +
test/test26.js | 24 +
test/test26.js.map | 1 +
test/test27.d.ts | 1 +
test/test27.js | 67 +
test/test27.js.map | 1 +
test/test28.d.ts | 1 +
test/test28.js | 75 +
test/test28.js.map | 1 +
test/test29.d.ts | 1 +
test/test29.js | 79 +
test/test29.js.map | 1 +
test/test3.d.ts | 1 +
test/test3.js | 17 +
test/test3.js.map | 1 +
test/test30.d.ts | 1 +
test/test30.js | 16 +
test/test30.js.map | 1 +
test/test31.d.ts | 1 +
test/test31.js | 59 +
test/test31.js.map | 1 +
test/test32.d.ts | 5 +
test/test32.js | 114 +
test/test32.js.map | 1 +
test/test33.d.ts | 1 +
test/test33.js | 46 +
test/test33.js.map | 1 +
test/test34.d.ts | 1 +
test/test34.js | 27 +
test/test34.js.map | 1 +
test/test35.d.ts | 1 +
test/test35.js | 128 +
test/test35.js.map | 1 +
test/test36.d.ts | 1 +
test/test36.js | 11 +
test/test36.js.map | 1 +
test/test37.d.ts | 9 +
test/test37.js | 284 +
test/test37.js.map | 1 +
test/test38.d.ts | 9 +
test/test38.js | 78 +
test/test38.js.map | 1 +
test/test39.d.ts | 1 +
test/test39.js | 193 +
test/test39.js.map | 1 +
test/test4.d.ts | 1 +
test/test4.js | 16 +
test/test4.js.map | 1 +
test/test44.d.ts | 1 +
test/test44.js | 14 +
test/test44.js.map | 1 +
test/test49.d.ts | 1 +
test/test49.js | 79 +
test/test49.js.map | 1 +
test/test5.d.ts | 1 +
test/test5.js | 68 +
test/test5.js.map | 1 +
test/test50.d.ts | 1 +
test/test50.js | 36 +
test/test50.js.map | 1 +
test/test51.d.ts | 1 +
test/test51.js | 150 +
test/test51.js.map | 1 +
test/test52.d.ts | 1 +
test/test52.js | 74 +
test/test52.js.map | 1 +
test/test53.d.ts | 1 +
test/test53.js | 22 +
test/test53.js.map | 1 +
test/test54.d.ts | 1 +
test/test54.js | 15 +
test/test54.js.map | 1 +
test/test55.d.ts | 1 +
test/test55.js | 124 +
test/test55.js.map | 1 +
test/test56.d.ts | 1 +
test/test56.js | 143 +
test/test56.js.map | 1 +
test/test57.d.ts | 1 +
test/test57.js | 142 +
test/test57.js.map | 1 +
test/test59.d.ts | 1 +
test/test59.js | 31 +
test/test59.js.map | 1 +
test/test6.d.ts | 1 +
test/test6.js | 79 +
test/test6.js.map | 1 +
test/test60.d.ts | 1 +
test/test60.js | 37 +
test/test60.js.map | 1 +
test/test61.d.ts | 1 +
test/test61.js | 22 +
test/test61.js.map | 1 +
test/test62.d.ts | 1 +
test/test62.js | 289 +
test/test62.js.map | 1 +
test/test63.d.ts | 1 +
test/test63.js | 84 +
test/test63.js.map | 1 +
test/test64.d.ts | 1 +
test/test64.js | 24 +
test/test64.js.map | 1 +
test/test65.d.ts | 1 +
test/test65.js | 38 +
test/test65.js.map | 1 +
test/test66.d.ts | 1 +
test/test66.js | 16 +
test/test66.js.map | 1 +
test/test67.d.ts | 1 +
test/test67.js | 59 +
test/test67.js.map | 1 +
test/test68.d.ts | 1 +
test/test68.js | 25 +
test/test68.js.map | 1 +
test/test69.d.ts | 1 +
test/test69.js | 11 +
test/test69.js.map | 1 +
test/test7.d.ts | 1 +
test/test7.js | 60 +
test/test7.js.map | 1 +
test/test70.d.ts | 1 +
test/test70.js | 12 +
test/test70.js.map | 1 +
test/test71.d.ts | 1 +
test/test71.js | 17 +
test/test71.js.map | 1 +
test/test73.d.ts | 1 +
test/test73.js | 103 +
test/test73.js.map | 1 +
test/test76.d.ts | 1 +
test/test76.js | 104 +
test/test76.js.map | 1 +
test/test78.d.ts | 1 +
test/test78.js | 101 +
test/test78.js.map | 1 +
test/test79.d.ts | 1 +
test/test79.js | 19 +
test/test79.js.map | 1 +
test/test8.d.ts | 13 +
test/test8.js | 73 +
test/test8.js.map | 1 +
test/test80.d.ts | 1 +
test/test80.js | 38 +
test/test80.js.map | 1 +
test/test81.d.ts | 1 +
test/test81.js | 66 +
test/test81.js.map | 1 +
test/test82.d.ts | 1 +
test/test82.js | 54 +
test/test82.js.map | 1 +
test/test83.d.ts | 1 +
test/test83.js | 19 +
test/test83.js.map | 1 +
test/test84.d.ts | 1 +
test/test84.js | 38 +
test/test84.js.map | 1 +
test/test85.d.ts | 1 +
test/test85.js | 8 +
test/test85.js.map | 1 +
test/test86.d.ts | 1 +
test/test86.js | 28 +
test/test86.js.map | 1 +
test/test87.d.ts | 1 +
test/test87.js | 19 +
test/test87.js.map | 1 +
test/test88.d.ts | 1 +
test/test88.js | 11 +
test/test88.js.map | 1 +
test/test9.d.ts | 13 +
test/test9.js | 200 +
test/test9.js.map | 1 +
test/test90.d.ts | 1 +
test/test90.js | 24 +
test/test90.js.map | 1 +
test/test91.d.ts | 1 +
test/test91.js | 92 +
test/test91.js.map | 1 +
test/test92.d.ts | 1 +
test/test92.js | 70 +
test/test92.js.map | 1 +
test/test93.d.ts | 1 +
test/test93.js | 17 +
test/test93.js.map | 1 +
test/test94.d.ts | 1 +
test/test94.js | 11 +
test/test94.js.map | 1 +
test/test95.d.ts | 1 +
test/test95.js | 144 +
test/test95.js.map | 1 +
test/test96.d.ts | 1 +
test/test96.js | 59 +
test/test96.js.map | 1 +
test/test97.d.ts | 1 +
test/test97.js | 103 +
test/test97.js.map | 1 +
test/test98.d.ts | 1 +
test/test98.js | 12 +
test/test98.js.map | 1 +
test/test99.d.ts | 1 +
test/test99.js | 19 +
test/test99.js.map | 1 +
test/types/Evt.create.d.ts | 1 +
test/types/Evt.create.js | 50 +
test/types/Evt.create.js.map | 1 +
test/types/EvtLike.d.ts | 1 +
test/types/EvtLike.js | 18 +
test/types/EvtLike.js.map | 1 +
test/types/EvtLikeToEvt.d.ts | 1 +
test/types/EvtLikeToEvt.js | 16 +
test/types/EvtLikeToEvt.js.map | 1 +
test/types/UnpackEvt.d.ts | 1 +
test/types/UnpackEvt.js | 19 +
test/types/UnpackEvt.js.map | 1 +
tools/Deferred.d.ts | 14 +
tools/Deferred.js | 50 +
tools/Deferred.js.map | 1 +
tools/concatUint8Array.d.ts | 1 +
tools/concatUint8Array.js | 21 +
tools/concatUint8Array.js.map | 1 +
tools/inDepth/copy.d.ts | 14 +
tools/inDepth/copy.js | 120 +
tools/inDepth/copy.js.map | 1 +
tools/inDepth/getPrototypeChain.d.ts | 4 +
tools/inDepth/getPrototypeChain.js | 50 +
tools/inDepth/getPrototypeChain.js.map | 1 +
tools/inDepth/index.d.ts | 2 +
tools/inDepth/index.js | 19 +
tools/inDepth/index.js.map | 1 +
tools/inDepth/same.d.ts | 30 +
tools/inDepth/same.js | 216 +
tools/inDepth/same.js.map | 1 +
tools/inDepth/test.d.ts | 1 +
tools/inDepth/test.js | 264 +
tools/inDepth/test.js.map | 1 +
tools/inDepth/types.d.ts | 23 +
tools/inDepth/types.js | 45 +
tools/inDepth/types.js.map | 1 +
tools/isCallableFunction.d.ts | 6 +
tools/isCallableFunction.js | 27 +
tools/isCallableFunction.js.map | 1 +
tools/minimal-polyfills/LightMap.d.ts | 8 +
tools/minimal-polyfills/LightMap.js | 3 +
tools/minimal-polyfills/LightMap.js.map | 1 +
tools/minimal-polyfills/LightSet.d.ts | 7 +
tools/minimal-polyfills/LightSet.js | 3 +
tools/minimal-polyfills/LightSet.js.map | 1 +
...seEffectRunConditionToDependencyArray.d.ts | 26 +
.../useEffectRunConditionToDependencyArray.js | 97 +
...EffectRunConditionToDependencyArray.js.map | 1 +
tools/powerhooks/useEffectIf.d.ts | 4 +
tools/powerhooks/useEffectIf.js | 58 +
tools/powerhooks/useEffectIf.js.map | 1 +
tools/powerhooks/useGuaranteedMemo.d.ts | 1 +
tools/powerhooks/useGuaranteedMemo.js | 67 +
tools/powerhooks/useGuaranteedMemo.js.map | 1 +
tools/reducers/allEquals.d.ts | 8 +
tools/reducers/allEquals.js | 49 +
tools/reducers/allEquals.js.map | 1 +
tools/reducers/allEqualsTo.d.ts | 8 +
tools/reducers/allEqualsTo.js | 46 +
tools/reducers/allEqualsTo.js.map | 1 +
tools/reducers/allUniq.d.ts | 8 +
tools/reducers/allUniq.js | 52 +
tools/reducers/allUniq.js.map | 1 +
tools/reducers/and.d.ts | 3 +
tools/reducers/and.js | 13 +
tools/reducers/and.js.map | 1 +
tools/reducers/contains.d.ts | 3 +
tools/reducers/contains.js | 41 +
tools/reducers/contains.js.map | 1 +
tools/reducers/count.d.ts | 3 +
tools/reducers/count.js | 15 +
tools/reducers/count.js.map | 1 +
tools/reducers/diff.d.ts | 13 +
tools/reducers/diff.js | 79 +
tools/reducers/diff.js.map | 1 +
tools/reducers/every.d.ts | 3 +
tools/reducers/every.js | 16 +
tools/reducers/every.js.map | 1 +
tools/reducers/includes.d.ts | 3 +
tools/reducers/includes.js | 13 +
tools/reducers/includes.js.map | 1 +
tools/reducers/index.d.ts | 13 +
tools/reducers/index.js | 33 +
tools/reducers/index.js.map | 1 +
tools/reducers/or.d.ts | 3 +
tools/reducers/or.js | 13 +
tools/reducers/or.js.map | 1 +
tools/reducers/partition.d.ts | 5 +
tools/reducers/partition.js | 28 +
tools/reducers/partition.js.map | 1 +
tools/reducers/reduceify.d.ts | 3 +
tools/reducers/reduceify.js | 57 +
tools/reducers/reduceify.js.map | 1 +
tools/reducers/removeDuplicates.d.ts | 8 +
tools/reducers/removeDuplicates.js | 51 +
tools/reducers/removeDuplicates.js.map | 1 +
tools/reducers/sameAs.d.ts | 8 +
tools/reducers/sameAs.js | 59 +
tools/reducers/sameAs.js.map | 1 +
tools/reducers/test.d.ts | 1 +
tools/reducers/test.js | 124 +
tools/reducers/test.js.map | 1 +
tools/safeSetTimeout.d.ts | 5 +
tools/safeSetTimeout.js | 8 +
tools/safeSetTimeout.js.map | 1 +
tools/testing/getPromiseAssertionApi.d.ts | 15 +
tools/testing/getPromiseAssertionApi.js | 36 +
tools/testing/getPromiseAssertionApi.js.map | 1 +
tools/testing/index.d.ts | 1 +
tools/testing/index.js | 18 +
tools/testing/index.js.map | 1 +
tools/tsafe/capitalize.d.ts | 2 +
tools/tsafe/capitalize.js | 9 +
tools/tsafe/capitalize.js.map | 1 +
tsconfig.tsbuildinfo | 1 +
801 files changed, 59957 insertions(+), 224 deletions(-)
delete mode 100644 .github/FUNDING.yml
delete mode 100644 .github/workflows/ci.yaml
create mode 100644 deno_dist/LICENSE
create mode 100644 deno_dist/README.md
create mode 100644 deno_dist/hooks/index.ts
create mode 100644 deno_dist/hooks/useEvt.ts
create mode 100644 deno_dist/hooks/useRerenderOnStateChange.ts
create mode 100644 deno_dist/lib/Ctx.ts
create mode 100644 deno_dist/lib/Evt.asNonPostable.ts
create mode 100644 deno_dist/lib/Evt.asPostable.ts
create mode 100644 deno_dist/lib/Evt.asyncPipe.ts
create mode 100644 deno_dist/lib/Evt.create.ts
create mode 100644 deno_dist/lib/Evt.factorize.ts
create mode 100644 deno_dist/lib/Evt.from.ts
create mode 100644 deno_dist/lib/Evt.getCtx.ts
create mode 100644 deno_dist/lib/Evt.loosenType.ts
create mode 100644 deno_dist/lib/Evt.merge.ts
create mode 100644 deno_dist/lib/Evt.newCtx.ts
create mode 100644 deno_dist/lib/Evt.parsePropsFromArgs.ts
create mode 100644 deno_dist/lib/Evt.ts
create mode 100644 deno_dist/lib/LazyEvt.ts
create mode 100644 deno_dist/lib/LazyStatefulEvt.ts
create mode 100644 deno_dist/lib/StatefulEvt.ts
create mode 100644 deno_dist/lib/importProxy.ts
create mode 100644 deno_dist/lib/index.ts
create mode 100644 deno_dist/lib/types/AsyncIterableEvt.ts
create mode 100644 deno_dist/lib/types/EventTargetLike.ts
create mode 100644 deno_dist/lib/types/EvtError.ts
create mode 100644 deno_dist/lib/types/Handler.ts
create mode 100644 deno_dist/lib/types/Observer.ts
create mode 100644 deno_dist/lib/types/Operator.ts
create mode 100644 deno_dist/lib/types/helper/EvtLikeToEvt.ts
create mode 100644 deno_dist/lib/types/helper/FactorizeEvt.ts
create mode 100644 deno_dist/lib/types/helper/SwapEvtType.ts
create mode 100644 deno_dist/lib/types/helper/ToNonPostableEvt.ts
create mode 100644 deno_dist/lib/types/helper/ToPostableEvt.ts
create mode 100644 deno_dist/lib/types/helper/UnpackCtx.ts
create mode 100644 deno_dist/lib/types/helper/UnpackEvt.ts
create mode 100644 deno_dist/lib/types/helper/index.ts
create mode 100644 deno_dist/lib/types/index.ts
create mode 100644 deno_dist/lib/types/interfaces/Ctx.ts
create mode 100644 deno_dist/lib/types/interfaces/CtxLike.ts
create mode 100644 deno_dist/lib/types/interfaces/Evt.ts
create mode 100644 deno_dist/lib/types/interfaces/EvtLike.ts
create mode 100644 deno_dist/lib/types/interfaces/NonPostableEvt.ts
create mode 100644 deno_dist/lib/types/interfaces/NonPostableEvtLike.ts
create mode 100644 deno_dist/lib/types/interfaces/Postable.ts
create mode 100644 deno_dist/lib/types/interfaces/StatefulEvt.ts
create mode 100644 deno_dist/lib/types/interfaces/StatefulEvtLike.ts
create mode 100644 deno_dist/lib/types/interfaces/StatefulPostable.ts
create mode 100644 deno_dist/lib/types/interfaces/StatefulReadonlyEvt.ts
create mode 100644 deno_dist/lib/types/interfaces/StatefulReadonlyEvtLike.ts
create mode 100644 deno_dist/lib/types/interfaces/index.ts
create mode 100644 deno_dist/lib/types/lib.dom.ts
create mode 100644 deno_dist/lib/util/compose.ts
create mode 100644 deno_dist/lib/util/convertOperatorToStatelessFLambda.ts
create mode 100644 deno_dist/lib/util/index.ts
create mode 100644 deno_dist/mod.ts
create mode 100644 deno_dist/operators/chunksOf.ts
create mode 100644 deno_dist/operators/distinct.ts
create mode 100644 deno_dist/operators/index.ts
create mode 100644 deno_dist/operators/nonNullable.ts
create mode 100644 deno_dist/operators/onlyIfChanged.ts
create mode 100644 deno_dist/operators/scan.ts
create mode 100644 deno_dist/operators/throttleTime.ts
create mode 100644 deno_dist/operators/to.ts
create mode 100644 deno_dist/test/getHandlerPr.ts
create mode 100644 deno_dist/test/index.ts
create mode 100644 deno_dist/test/mod.ts
create mode 100644 deno_dist/test/test1.ts
create mode 100644 deno_dist/test/test10.ts
create mode 100644 deno_dist/test/test100.ts
create mode 100644 deno_dist/test/test101.ts
create mode 100644 deno_dist/test/test102.ts
create mode 100644 deno_dist/test/test103.ts
create mode 100644 deno_dist/test/test104.ts
create mode 100644 deno_dist/test/test105.ts
create mode 100644 deno_dist/test/test106.ts
create mode 100644 deno_dist/test/test107.ts
create mode 100644 deno_dist/test/test108.ts
create mode 100644 deno_dist/test/test109.ts
create mode 100644 deno_dist/test/test11.ts
create mode 100644 deno_dist/test/test110.ts
create mode 100644 deno_dist/test/test12.ts
create mode 100644 deno_dist/test/test13.ts
create mode 100644 deno_dist/test/test14.ts
create mode 100644 deno_dist/test/test15.ts
create mode 100644 deno_dist/test/test16.ts
create mode 100644 deno_dist/test/test17.ts
create mode 100644 deno_dist/test/test18.ts
create mode 100644 deno_dist/test/test19.ts
create mode 100644 deno_dist/test/test2.ts
create mode 100644 deno_dist/test/test20.ts
create mode 100644 deno_dist/test/test21.ts
create mode 100644 deno_dist/test/test22.ts
create mode 100644 deno_dist/test/test23.ts
create mode 100644 deno_dist/test/test24.ts
create mode 100644 deno_dist/test/test25.ts
create mode 100644 deno_dist/test/test26.ts
create mode 100644 deno_dist/test/test27.ts
create mode 100644 deno_dist/test/test28.ts
create mode 100644 deno_dist/test/test29.ts
create mode 100644 deno_dist/test/test3.ts
create mode 100644 deno_dist/test/test30.ts
create mode 100644 deno_dist/test/test31.ts
create mode 100644 deno_dist/test/test32.ts
create mode 100644 deno_dist/test/test33.ts
create mode 100644 deno_dist/test/test34.ts
create mode 100644 deno_dist/test/test35.ts
create mode 100644 deno_dist/test/test36.ts
create mode 100644 deno_dist/test/test37.ts
create mode 100644 deno_dist/test/test38.ts
create mode 100644 deno_dist/test/test39.ts
create mode 100644 deno_dist/test/test4.ts
create mode 100644 deno_dist/test/test44.ts
create mode 100644 deno_dist/test/test49.ts
create mode 100644 deno_dist/test/test5.ts
create mode 100644 deno_dist/test/test50.ts
create mode 100644 deno_dist/test/test51.ts
create mode 100644 deno_dist/test/test52.ts
create mode 100644 deno_dist/test/test53.ts
create mode 100644 deno_dist/test/test54.ts
create mode 100644 deno_dist/test/test55.ts
create mode 100644 deno_dist/test/test56.ts
create mode 100644 deno_dist/test/test57.ts
create mode 100644 deno_dist/test/test59.ts
create mode 100644 deno_dist/test/test6.ts
create mode 100644 deno_dist/test/test60.ts
create mode 100644 deno_dist/test/test61.ts
create mode 100644 deno_dist/test/test62.ts
create mode 100644 deno_dist/test/test63.ts
create mode 100644 deno_dist/test/test64.ts
create mode 100644 deno_dist/test/test65.ts
create mode 100644 deno_dist/test/test66.ts
create mode 100644 deno_dist/test/test67.ts
create mode 100644 deno_dist/test/test68.ts
create mode 100644 deno_dist/test/test69.ts
create mode 100644 deno_dist/test/test7.ts
create mode 100644 deno_dist/test/test70.ts
create mode 100644 deno_dist/test/test71.ts
create mode 100644 deno_dist/test/test73.ts
create mode 100644 deno_dist/test/test76.ts
create mode 100644 deno_dist/test/test78.ts
create mode 100644 deno_dist/test/test79.ts
create mode 100644 deno_dist/test/test8.ts
create mode 100644 deno_dist/test/test80.ts
create mode 100644 deno_dist/test/test81.ts
create mode 100644 deno_dist/test/test82.ts
create mode 100644 deno_dist/test/test83.ts
create mode 100644 deno_dist/test/test84.ts
create mode 100644 deno_dist/test/test85.ts
create mode 100644 deno_dist/test/test86.ts
create mode 100644 deno_dist/test/test87.ts
create mode 100644 deno_dist/test/test88.ts
create mode 100644 deno_dist/test/test9.ts
create mode 100644 deno_dist/test/test90.ts
create mode 100644 deno_dist/test/test91.ts
create mode 100644 deno_dist/test/test92.ts
create mode 100644 deno_dist/test/test93.ts
create mode 100644 deno_dist/test/test94.ts
create mode 100644 deno_dist/test/test95.ts
create mode 100644 deno_dist/test/test96.ts
create mode 100644 deno_dist/test/test97.ts
create mode 100644 deno_dist/test/test98.ts
create mode 100644 deno_dist/test/test99.ts
create mode 100644 deno_dist/test/types/Evt.create.ts
create mode 100644 deno_dist/test/types/EvtLike.ts
create mode 100644 deno_dist/test/types/EvtLikeToEvt.ts
create mode 100644 deno_dist/test/types/README.md
create mode 100644 deno_dist/test/types/UnpackEvt.ts
create mode 100644 deno_dist/tools/Deferred.ts
create mode 100644 deno_dist/tools/concatUint8Array.ts
create mode 100644 deno_dist/tools/inDepth/copy.ts
create mode 100644 deno_dist/tools/inDepth/getPrototypeChain.ts
create mode 100644 deno_dist/tools/inDepth/index.ts
create mode 100644 deno_dist/tools/inDepth/same.ts
create mode 100644 deno_dist/tools/inDepth/test.ts
create mode 100644 deno_dist/tools/inDepth/types.ts
create mode 100644 deno_dist/tools/isCallableFunction.ts
create mode 100644 deno_dist/tools/minimal-polyfills/LightMap.ts
create mode 100644 deno_dist/tools/minimal-polyfills/LightSet.ts
create mode 100644 deno_dist/tools/powerhooks/tools/useEffectRunConditionToDependencyArray.ts
create mode 100644 deno_dist/tools/powerhooks/useEffectIf.ts
create mode 100644 deno_dist/tools/powerhooks/useGuaranteedMemo.ts
create mode 100644 deno_dist/tools/reducers/allEquals.ts
create mode 100644 deno_dist/tools/reducers/allEqualsTo.ts
create mode 100644 deno_dist/tools/reducers/allUniq.ts
create mode 100644 deno_dist/tools/reducers/and.ts
create mode 100644 deno_dist/tools/reducers/contains.ts
create mode 100644 deno_dist/tools/reducers/count.ts
create mode 100644 deno_dist/tools/reducers/diff.ts
create mode 100644 deno_dist/tools/reducers/every.ts
create mode 100644 deno_dist/tools/reducers/includes.ts
create mode 100644 deno_dist/tools/reducers/index.ts
create mode 100644 deno_dist/tools/reducers/or.ts
create mode 100644 deno_dist/tools/reducers/partition.ts
create mode 100644 deno_dist/tools/reducers/reduceify.ts
create mode 100644 deno_dist/tools/reducers/removeDuplicates.ts
create mode 100644 deno_dist/tools/reducers/sameAs.ts
create mode 100644 deno_dist/tools/reducers/test.ts
create mode 100644 deno_dist/tools/safeSetTimeout.ts
create mode 100644 deno_dist/tools/testing/getPromiseAssertionApi.ts
create mode 100644 deno_dist/tools/testing/index.ts
create mode 100644 deno_dist/tools/tsafe/capitalize.ts
create mode 100644 hooks/index.d.ts
create mode 100644 hooks/index.js
create mode 100644 hooks/index.js.map
create mode 100644 hooks/useEvt.d.ts
create mode 100644 hooks/useEvt.js
create mode 100644 hooks/useEvt.js.map
create mode 100644 hooks/useRerenderOnStateChange.d.ts
create mode 100644 hooks/useRerenderOnStateChange.js
create mode 100644 hooks/useRerenderOnStateChange.js.map
create mode 100644 lib/Ctx.d.ts
create mode 100644 lib/Ctx.js
create mode 100644 lib/Ctx.js.map
create mode 100644 lib/Evt.asNonPostable.d.ts
create mode 100644 lib/Evt.asNonPostable.js
create mode 100644 lib/Evt.asNonPostable.js.map
create mode 100644 lib/Evt.asPostable.d.ts
create mode 100644 lib/Evt.asPostable.js
create mode 100644 lib/Evt.asPostable.js.map
create mode 100644 lib/Evt.asyncPipe.d.ts
create mode 100644 lib/Evt.asyncPipe.js
create mode 100644 lib/Evt.asyncPipe.js.map
create mode 100644 lib/Evt.create.d.ts
create mode 100644 lib/Evt.create.js
create mode 100644 lib/Evt.create.js.map
create mode 100644 lib/Evt.d.ts
create mode 100644 lib/Evt.factorize.d.ts
create mode 100644 lib/Evt.factorize.js
create mode 100644 lib/Evt.factorize.js.map
create mode 100644 lib/Evt.from.d.ts
create mode 100644 lib/Evt.from.js
create mode 100644 lib/Evt.from.js.map
create mode 100644 lib/Evt.getCtx.d.ts
create mode 100644 lib/Evt.getCtx.js
create mode 100644 lib/Evt.getCtx.js.map
create mode 100644 lib/Evt.js
create mode 100644 lib/Evt.js.map
create mode 100644 lib/Evt.loosenType.d.ts
create mode 100644 lib/Evt.loosenType.js
create mode 100644 lib/Evt.loosenType.js.map
create mode 100644 lib/Evt.merge.d.ts
create mode 100644 lib/Evt.merge.js
create mode 100644 lib/Evt.merge.js.map
create mode 100644 lib/Evt.newCtx.d.ts
create mode 100644 lib/Evt.newCtx.js
create mode 100644 lib/Evt.newCtx.js.map
create mode 100644 lib/Evt.parsePropsFromArgs.d.ts
create mode 100644 lib/Evt.parsePropsFromArgs.js
create mode 100644 lib/Evt.parsePropsFromArgs.js.map
create mode 100644 lib/LazyEvt.d.ts
create mode 100644 lib/LazyEvt.js
create mode 100644 lib/LazyEvt.js.map
create mode 100644 lib/LazyStatefulEvt.d.ts
create mode 100644 lib/LazyStatefulEvt.js
create mode 100644 lib/LazyStatefulEvt.js.map
create mode 100644 lib/StatefulEvt.d.ts
create mode 100644 lib/StatefulEvt.js
create mode 100644 lib/StatefulEvt.js.map
create mode 100644 lib/importProxy.d.ts
create mode 100644 lib/importProxy.js
create mode 100644 lib/importProxy.js.map
create mode 100644 lib/index.d.ts
create mode 100644 lib/index.js
create mode 100644 lib/index.js.map
create mode 100644 lib/types/AsyncIterableEvt.d.ts
create mode 100644 lib/types/AsyncIterableEvt.js
create mode 100644 lib/types/AsyncIterableEvt.js.map
create mode 100644 lib/types/EventTargetLike.d.ts
create mode 100644 lib/types/EventTargetLike.js
create mode 100644 lib/types/EventTargetLike.js.map
create mode 100644 lib/types/EvtError.d.ts
create mode 100644 lib/types/EvtError.js
create mode 100644 lib/types/EvtError.js.map
create mode 100644 lib/types/Handler.d.ts
create mode 100644 lib/types/Handler.js
create mode 100644 lib/types/Handler.js.map
create mode 100644 lib/types/Observer.d.ts
create mode 100644 lib/types/Observer.js
create mode 100644 lib/types/Observer.js.map
create mode 100644 lib/types/Operator.d.ts
create mode 100644 lib/types/Operator.js
create mode 100644 lib/types/Operator.js.map
create mode 100644 lib/types/helper/EvtLikeToEvt.d.ts
create mode 100644 lib/types/helper/EvtLikeToEvt.js
create mode 100644 lib/types/helper/EvtLikeToEvt.js.map
create mode 100644 lib/types/helper/FactorizeEvt.d.ts
create mode 100644 lib/types/helper/FactorizeEvt.js
create mode 100644 lib/types/helper/FactorizeEvt.js.map
create mode 100644 lib/types/helper/SwapEvtType.d.ts
create mode 100644 lib/types/helper/SwapEvtType.js
create mode 100644 lib/types/helper/SwapEvtType.js.map
create mode 100644 lib/types/helper/ToNonPostableEvt.d.ts
create mode 100644 lib/types/helper/ToNonPostableEvt.js
create mode 100644 lib/types/helper/ToNonPostableEvt.js.map
create mode 100644 lib/types/helper/ToPostableEvt.d.ts
create mode 100644 lib/types/helper/ToPostableEvt.js
create mode 100644 lib/types/helper/ToPostableEvt.js.map
create mode 100644 lib/types/helper/UnpackCtx.d.ts
create mode 100644 lib/types/helper/UnpackCtx.js
create mode 100644 lib/types/helper/UnpackCtx.js.map
create mode 100644 lib/types/helper/UnpackEvt.d.ts
create mode 100644 lib/types/helper/UnpackEvt.js
create mode 100644 lib/types/helper/UnpackEvt.js.map
create mode 100644 lib/types/helper/index.d.ts
create mode 100644 lib/types/helper/index.js
create mode 100644 lib/types/helper/index.js.map
create mode 100644 lib/types/index.d.ts
create mode 100644 lib/types/index.js
create mode 100644 lib/types/index.js.map
create mode 100644 lib/types/interfaces/Ctx.d.ts
create mode 100644 lib/types/interfaces/Ctx.js
create mode 100644 lib/types/interfaces/Ctx.js.map
create mode 100644 lib/types/interfaces/CtxLike.d.ts
create mode 100644 lib/types/interfaces/CtxLike.js
create mode 100644 lib/types/interfaces/CtxLike.js.map
create mode 100644 lib/types/interfaces/Evt.d.ts
create mode 100644 lib/types/interfaces/Evt.js
create mode 100644 lib/types/interfaces/Evt.js.map
create mode 100644 lib/types/interfaces/EvtLike.d.ts
create mode 100644 lib/types/interfaces/EvtLike.js
create mode 100644 lib/types/interfaces/EvtLike.js.map
create mode 100644 lib/types/interfaces/NonPostableEvt.d.ts
create mode 100644 lib/types/interfaces/NonPostableEvt.js
create mode 100644 lib/types/interfaces/NonPostableEvt.js.map
create mode 100644 lib/types/interfaces/NonPostableEvtLike.d.ts
create mode 100644 lib/types/interfaces/NonPostableEvtLike.js
create mode 100644 lib/types/interfaces/NonPostableEvtLike.js.map
create mode 100644 lib/types/interfaces/Postable.d.ts
create mode 100644 lib/types/interfaces/Postable.js
create mode 100644 lib/types/interfaces/Postable.js.map
create mode 100644 lib/types/interfaces/StatefulEvt.d.ts
create mode 100644 lib/types/interfaces/StatefulEvt.js
create mode 100644 lib/types/interfaces/StatefulEvt.js.map
create mode 100644 lib/types/interfaces/StatefulEvtLike.d.ts
create mode 100644 lib/types/interfaces/StatefulEvtLike.js
create mode 100644 lib/types/interfaces/StatefulEvtLike.js.map
create mode 100644 lib/types/interfaces/StatefulPostable.d.ts
create mode 100644 lib/types/interfaces/StatefulPostable.js
create mode 100644 lib/types/interfaces/StatefulPostable.js.map
create mode 100644 lib/types/interfaces/StatefulReadonlyEvt.d.ts
create mode 100644 lib/types/interfaces/StatefulReadonlyEvt.js
create mode 100644 lib/types/interfaces/StatefulReadonlyEvt.js.map
create mode 100644 lib/types/interfaces/StatefulReadonlyEvtLike.d.ts
create mode 100644 lib/types/interfaces/StatefulReadonlyEvtLike.js
create mode 100644 lib/types/interfaces/StatefulReadonlyEvtLike.js.map
create mode 100644 lib/types/interfaces/index.d.ts
create mode 100644 lib/types/interfaces/index.js
create mode 100644 lib/types/interfaces/index.js.map
create mode 100644 lib/types/lib.dom.d.ts
create mode 100644 lib/types/lib.dom.js
create mode 100644 lib/types/lib.dom.js.map
create mode 100644 lib/util/compose.d.ts
create mode 100644 lib/util/compose.js
create mode 100644 lib/util/compose.js.map
create mode 100644 lib/util/convertOperatorToStatelessFLambda.d.ts
create mode 100644 lib/util/convertOperatorToStatelessFLambda.js
create mode 100644 lib/util/convertOperatorToStatelessFLambda.js.map
create mode 100644 lib/util/index.d.ts
create mode 100644 lib/util/index.js
create mode 100644 lib/util/index.js.map
create mode 100644 operators/chunksOf.d.ts
create mode 100644 operators/chunksOf.js
create mode 100644 operators/chunksOf.js.map
create mode 100644 operators/distinct.d.ts
create mode 100644 operators/distinct.js
create mode 100644 operators/distinct.js.map
create mode 100644 operators/index.d.ts
create mode 100644 operators/index.js
create mode 100644 operators/index.js.map
create mode 100644 operators/nonNullable.d.ts
create mode 100644 operators/nonNullable.js
create mode 100644 operators/nonNullable.js.map
create mode 100644 operators/onlyIfChanged.d.ts
create mode 100644 operators/onlyIfChanged.js
create mode 100644 operators/onlyIfChanged.js.map
create mode 100644 operators/scan.d.ts
create mode 100644 operators/scan.js
create mode 100644 operators/scan.js.map
create mode 100644 operators/throttleTime.d.ts
create mode 100644 operators/throttleTime.js
create mode 100644 operators/throttleTime.js.map
create mode 100644 operators/to.d.ts
create mode 100644 operators/to.js
create mode 100644 operators/to.js.map
create mode 100644 test/getHandlerPr.d.ts
create mode 100644 test/getHandlerPr.js
create mode 100644 test/getHandlerPr.js.map
create mode 100644 test/index.d.ts
create mode 100644 test/index.js
create mode 100644 test/index.js.map
create mode 100644 test/mod.d.ts
create mode 100644 test/mod.js
create mode 100644 test/mod.js.map
create mode 100644 test/test1.d.ts
create mode 100644 test/test1.js
create mode 100644 test/test1.js.map
create mode 100644 test/test10.d.ts
create mode 100644 test/test10.js
create mode 100644 test/test10.js.map
create mode 100644 test/test100.d.ts
create mode 100644 test/test100.js
create mode 100644 test/test100.js.map
create mode 100644 test/test101.d.ts
create mode 100644 test/test101.js
create mode 100644 test/test101.js.map
create mode 100644 test/test102.d.ts
create mode 100644 test/test102.js
create mode 100644 test/test102.js.map
create mode 100644 test/test103.d.ts
create mode 100644 test/test103.js
create mode 100644 test/test103.js.map
create mode 100644 test/test104.d.ts
create mode 100644 test/test104.js
create mode 100644 test/test104.js.map
create mode 100644 test/test105.d.ts
create mode 100644 test/test105.js
create mode 100644 test/test105.js.map
create mode 100644 test/test106.d.ts
create mode 100644 test/test106.js
create mode 100644 test/test106.js.map
create mode 100644 test/test107.d.ts
create mode 100644 test/test107.js
create mode 100644 test/test107.js.map
create mode 100644 test/test108.d.ts
create mode 100644 test/test108.js
create mode 100644 test/test108.js.map
create mode 100644 test/test109.d.ts
create mode 100644 test/test109.js
create mode 100644 test/test109.js.map
create mode 100644 test/test11.d.ts
create mode 100644 test/test11.js
create mode 100644 test/test11.js.map
create mode 100644 test/test110.d.ts
create mode 100644 test/test110.js
create mode 100644 test/test110.js.map
create mode 100644 test/test12.d.ts
create mode 100644 test/test12.js
create mode 100644 test/test12.js.map
create mode 100644 test/test13.d.ts
create mode 100644 test/test13.js
create mode 100644 test/test13.js.map
create mode 100644 test/test14.d.ts
create mode 100644 test/test14.js
create mode 100644 test/test14.js.map
create mode 100644 test/test15.d.ts
create mode 100644 test/test15.js
create mode 100644 test/test15.js.map
create mode 100644 test/test16.d.ts
create mode 100644 test/test16.js
create mode 100644 test/test16.js.map
create mode 100644 test/test17.d.ts
create mode 100644 test/test17.js
create mode 100644 test/test17.js.map
create mode 100644 test/test18.d.ts
create mode 100644 test/test18.js
create mode 100644 test/test18.js.map
create mode 100644 test/test19.d.ts
create mode 100644 test/test19.js
create mode 100644 test/test19.js.map
create mode 100644 test/test2.d.ts
create mode 100644 test/test2.js
create mode 100644 test/test2.js.map
create mode 100644 test/test20.d.ts
create mode 100644 test/test20.js
create mode 100644 test/test20.js.map
create mode 100644 test/test21.d.ts
create mode 100644 test/test21.js
create mode 100644 test/test21.js.map
create mode 100644 test/test22.d.ts
create mode 100644 test/test22.js
create mode 100644 test/test22.js.map
create mode 100644 test/test23.d.ts
create mode 100644 test/test23.js
create mode 100644 test/test23.js.map
create mode 100644 test/test24.d.ts
create mode 100644 test/test24.js
create mode 100644 test/test24.js.map
create mode 100644 test/test25.d.ts
create mode 100644 test/test25.js
create mode 100644 test/test25.js.map
create mode 100644 test/test26.d.ts
create mode 100644 test/test26.js
create mode 100644 test/test26.js.map
create mode 100644 test/test27.d.ts
create mode 100644 test/test27.js
create mode 100644 test/test27.js.map
create mode 100644 test/test28.d.ts
create mode 100644 test/test28.js
create mode 100644 test/test28.js.map
create mode 100644 test/test29.d.ts
create mode 100644 test/test29.js
create mode 100644 test/test29.js.map
create mode 100644 test/test3.d.ts
create mode 100644 test/test3.js
create mode 100644 test/test3.js.map
create mode 100644 test/test30.d.ts
create mode 100644 test/test30.js
create mode 100644 test/test30.js.map
create mode 100644 test/test31.d.ts
create mode 100644 test/test31.js
create mode 100644 test/test31.js.map
create mode 100644 test/test32.d.ts
create mode 100644 test/test32.js
create mode 100644 test/test32.js.map
create mode 100644 test/test33.d.ts
create mode 100644 test/test33.js
create mode 100644 test/test33.js.map
create mode 100644 test/test34.d.ts
create mode 100644 test/test34.js
create mode 100644 test/test34.js.map
create mode 100644 test/test35.d.ts
create mode 100644 test/test35.js
create mode 100644 test/test35.js.map
create mode 100644 test/test36.d.ts
create mode 100644 test/test36.js
create mode 100644 test/test36.js.map
create mode 100644 test/test37.d.ts
create mode 100644 test/test37.js
create mode 100644 test/test37.js.map
create mode 100644 test/test38.d.ts
create mode 100644 test/test38.js
create mode 100644 test/test38.js.map
create mode 100644 test/test39.d.ts
create mode 100644 test/test39.js
create mode 100644 test/test39.js.map
create mode 100644 test/test4.d.ts
create mode 100644 test/test4.js
create mode 100644 test/test4.js.map
create mode 100644 test/test44.d.ts
create mode 100644 test/test44.js
create mode 100644 test/test44.js.map
create mode 100644 test/test49.d.ts
create mode 100644 test/test49.js
create mode 100644 test/test49.js.map
create mode 100644 test/test5.d.ts
create mode 100644 test/test5.js
create mode 100644 test/test5.js.map
create mode 100644 test/test50.d.ts
create mode 100644 test/test50.js
create mode 100644 test/test50.js.map
create mode 100644 test/test51.d.ts
create mode 100644 test/test51.js
create mode 100644 test/test51.js.map
create mode 100644 test/test52.d.ts
create mode 100644 test/test52.js
create mode 100644 test/test52.js.map
create mode 100644 test/test53.d.ts
create mode 100644 test/test53.js
create mode 100644 test/test53.js.map
create mode 100644 test/test54.d.ts
create mode 100644 test/test54.js
create mode 100644 test/test54.js.map
create mode 100644 test/test55.d.ts
create mode 100644 test/test55.js
create mode 100644 test/test55.js.map
create mode 100644 test/test56.d.ts
create mode 100644 test/test56.js
create mode 100644 test/test56.js.map
create mode 100644 test/test57.d.ts
create mode 100644 test/test57.js
create mode 100644 test/test57.js.map
create mode 100644 test/test59.d.ts
create mode 100644 test/test59.js
create mode 100644 test/test59.js.map
create mode 100644 test/test6.d.ts
create mode 100644 test/test6.js
create mode 100644 test/test6.js.map
create mode 100644 test/test60.d.ts
create mode 100644 test/test60.js
create mode 100644 test/test60.js.map
create mode 100644 test/test61.d.ts
create mode 100644 test/test61.js
create mode 100644 test/test61.js.map
create mode 100644 test/test62.d.ts
create mode 100644 test/test62.js
create mode 100644 test/test62.js.map
create mode 100644 test/test63.d.ts
create mode 100644 test/test63.js
create mode 100644 test/test63.js.map
create mode 100644 test/test64.d.ts
create mode 100644 test/test64.js
create mode 100644 test/test64.js.map
create mode 100644 test/test65.d.ts
create mode 100644 test/test65.js
create mode 100644 test/test65.js.map
create mode 100644 test/test66.d.ts
create mode 100644 test/test66.js
create mode 100644 test/test66.js.map
create mode 100644 test/test67.d.ts
create mode 100644 test/test67.js
create mode 100644 test/test67.js.map
create mode 100644 test/test68.d.ts
create mode 100644 test/test68.js
create mode 100644 test/test68.js.map
create mode 100644 test/test69.d.ts
create mode 100644 test/test69.js
create mode 100644 test/test69.js.map
create mode 100644 test/test7.d.ts
create mode 100644 test/test7.js
create mode 100644 test/test7.js.map
create mode 100644 test/test70.d.ts
create mode 100644 test/test70.js
create mode 100644 test/test70.js.map
create mode 100644 test/test71.d.ts
create mode 100644 test/test71.js
create mode 100644 test/test71.js.map
create mode 100644 test/test73.d.ts
create mode 100644 test/test73.js
create mode 100644 test/test73.js.map
create mode 100644 test/test76.d.ts
create mode 100644 test/test76.js
create mode 100644 test/test76.js.map
create mode 100644 test/test78.d.ts
create mode 100644 test/test78.js
create mode 100644 test/test78.js.map
create mode 100644 test/test79.d.ts
create mode 100644 test/test79.js
create mode 100644 test/test79.js.map
create mode 100644 test/test8.d.ts
create mode 100644 test/test8.js
create mode 100644 test/test8.js.map
create mode 100644 test/test80.d.ts
create mode 100644 test/test80.js
create mode 100644 test/test80.js.map
create mode 100644 test/test81.d.ts
create mode 100644 test/test81.js
create mode 100644 test/test81.js.map
create mode 100644 test/test82.d.ts
create mode 100644 test/test82.js
create mode 100644 test/test82.js.map
create mode 100644 test/test83.d.ts
create mode 100644 test/test83.js
create mode 100644 test/test83.js.map
create mode 100644 test/test84.d.ts
create mode 100644 test/test84.js
create mode 100644 test/test84.js.map
create mode 100644 test/test85.d.ts
create mode 100644 test/test85.js
create mode 100644 test/test85.js.map
create mode 100644 test/test86.d.ts
create mode 100644 test/test86.js
create mode 100644 test/test86.js.map
create mode 100644 test/test87.d.ts
create mode 100644 test/test87.js
create mode 100644 test/test87.js.map
create mode 100644 test/test88.d.ts
create mode 100644 test/test88.js
create mode 100644 test/test88.js.map
create mode 100644 test/test9.d.ts
create mode 100644 test/test9.js
create mode 100644 test/test9.js.map
create mode 100644 test/test90.d.ts
create mode 100644 test/test90.js
create mode 100644 test/test90.js.map
create mode 100644 test/test91.d.ts
create mode 100644 test/test91.js
create mode 100644 test/test91.js.map
create mode 100644 test/test92.d.ts
create mode 100644 test/test92.js
create mode 100644 test/test92.js.map
create mode 100644 test/test93.d.ts
create mode 100644 test/test93.js
create mode 100644 test/test93.js.map
create mode 100644 test/test94.d.ts
create mode 100644 test/test94.js
create mode 100644 test/test94.js.map
create mode 100644 test/test95.d.ts
create mode 100644 test/test95.js
create mode 100644 test/test95.js.map
create mode 100644 test/test96.d.ts
create mode 100644 test/test96.js
create mode 100644 test/test96.js.map
create mode 100644 test/test97.d.ts
create mode 100644 test/test97.js
create mode 100644 test/test97.js.map
create mode 100644 test/test98.d.ts
create mode 100644 test/test98.js
create mode 100644 test/test98.js.map
create mode 100644 test/test99.d.ts
create mode 100644 test/test99.js
create mode 100644 test/test99.js.map
create mode 100644 test/types/Evt.create.d.ts
create mode 100644 test/types/Evt.create.js
create mode 100644 test/types/Evt.create.js.map
create mode 100644 test/types/EvtLike.d.ts
create mode 100644 test/types/EvtLike.js
create mode 100644 test/types/EvtLike.js.map
create mode 100644 test/types/EvtLikeToEvt.d.ts
create mode 100644 test/types/EvtLikeToEvt.js
create mode 100644 test/types/EvtLikeToEvt.js.map
create mode 100644 test/types/UnpackEvt.d.ts
create mode 100644 test/types/UnpackEvt.js
create mode 100644 test/types/UnpackEvt.js.map
create mode 100644 tools/Deferred.d.ts
create mode 100644 tools/Deferred.js
create mode 100644 tools/Deferred.js.map
create mode 100644 tools/concatUint8Array.d.ts
create mode 100644 tools/concatUint8Array.js
create mode 100644 tools/concatUint8Array.js.map
create mode 100644 tools/inDepth/copy.d.ts
create mode 100644 tools/inDepth/copy.js
create mode 100644 tools/inDepth/copy.js.map
create mode 100644 tools/inDepth/getPrototypeChain.d.ts
create mode 100644 tools/inDepth/getPrototypeChain.js
create mode 100644 tools/inDepth/getPrototypeChain.js.map
create mode 100644 tools/inDepth/index.d.ts
create mode 100644 tools/inDepth/index.js
create mode 100644 tools/inDepth/index.js.map
create mode 100644 tools/inDepth/same.d.ts
create mode 100644 tools/inDepth/same.js
create mode 100644 tools/inDepth/same.js.map
create mode 100644 tools/inDepth/test.d.ts
create mode 100644 tools/inDepth/test.js
create mode 100644 tools/inDepth/test.js.map
create mode 100644 tools/inDepth/types.d.ts
create mode 100644 tools/inDepth/types.js
create mode 100644 tools/inDepth/types.js.map
create mode 100644 tools/isCallableFunction.d.ts
create mode 100644 tools/isCallableFunction.js
create mode 100644 tools/isCallableFunction.js.map
create mode 100644 tools/minimal-polyfills/LightMap.d.ts
create mode 100644 tools/minimal-polyfills/LightMap.js
create mode 100644 tools/minimal-polyfills/LightMap.js.map
create mode 100644 tools/minimal-polyfills/LightSet.d.ts
create mode 100644 tools/minimal-polyfills/LightSet.js
create mode 100644 tools/minimal-polyfills/LightSet.js.map
create mode 100644 tools/powerhooks/tools/useEffectRunConditionToDependencyArray.d.ts
create mode 100644 tools/powerhooks/tools/useEffectRunConditionToDependencyArray.js
create mode 100644 tools/powerhooks/tools/useEffectRunConditionToDependencyArray.js.map
create mode 100644 tools/powerhooks/useEffectIf.d.ts
create mode 100644 tools/powerhooks/useEffectIf.js
create mode 100644 tools/powerhooks/useEffectIf.js.map
create mode 100644 tools/powerhooks/useGuaranteedMemo.d.ts
create mode 100644 tools/powerhooks/useGuaranteedMemo.js
create mode 100644 tools/powerhooks/useGuaranteedMemo.js.map
create mode 100644 tools/reducers/allEquals.d.ts
create mode 100644 tools/reducers/allEquals.js
create mode 100644 tools/reducers/allEquals.js.map
create mode 100644 tools/reducers/allEqualsTo.d.ts
create mode 100644 tools/reducers/allEqualsTo.js
create mode 100644 tools/reducers/allEqualsTo.js.map
create mode 100644 tools/reducers/allUniq.d.ts
create mode 100644 tools/reducers/allUniq.js
create mode 100644 tools/reducers/allUniq.js.map
create mode 100644 tools/reducers/and.d.ts
create mode 100644 tools/reducers/and.js
create mode 100644 tools/reducers/and.js.map
create mode 100644 tools/reducers/contains.d.ts
create mode 100644 tools/reducers/contains.js
create mode 100644 tools/reducers/contains.js.map
create mode 100644 tools/reducers/count.d.ts
create mode 100644 tools/reducers/count.js
create mode 100644 tools/reducers/count.js.map
create mode 100644 tools/reducers/diff.d.ts
create mode 100644 tools/reducers/diff.js
create mode 100644 tools/reducers/diff.js.map
create mode 100644 tools/reducers/every.d.ts
create mode 100644 tools/reducers/every.js
create mode 100644 tools/reducers/every.js.map
create mode 100644 tools/reducers/includes.d.ts
create mode 100644 tools/reducers/includes.js
create mode 100644 tools/reducers/includes.js.map
create mode 100644 tools/reducers/index.d.ts
create mode 100644 tools/reducers/index.js
create mode 100644 tools/reducers/index.js.map
create mode 100644 tools/reducers/or.d.ts
create mode 100644 tools/reducers/or.js
create mode 100644 tools/reducers/or.js.map
create mode 100644 tools/reducers/partition.d.ts
create mode 100644 tools/reducers/partition.js
create mode 100644 tools/reducers/partition.js.map
create mode 100644 tools/reducers/reduceify.d.ts
create mode 100644 tools/reducers/reduceify.js
create mode 100644 tools/reducers/reduceify.js.map
create mode 100644 tools/reducers/removeDuplicates.d.ts
create mode 100644 tools/reducers/removeDuplicates.js
create mode 100644 tools/reducers/removeDuplicates.js.map
create mode 100644 tools/reducers/sameAs.d.ts
create mode 100644 tools/reducers/sameAs.js
create mode 100644 tools/reducers/sameAs.js.map
create mode 100644 tools/reducers/test.d.ts
create mode 100644 tools/reducers/test.js
create mode 100644 tools/reducers/test.js.map
create mode 100644 tools/safeSetTimeout.d.ts
create mode 100644 tools/safeSetTimeout.js
create mode 100644 tools/safeSetTimeout.js.map
create mode 100644 tools/testing/getPromiseAssertionApi.d.ts
create mode 100644 tools/testing/getPromiseAssertionApi.js
create mode 100644 tools/testing/getPromiseAssertionApi.js.map
create mode 100644 tools/testing/index.d.ts
create mode 100644 tools/testing/index.js
create mode 100644 tools/testing/index.js.map
create mode 100644 tools/tsafe/capitalize.d.ts
create mode 100644 tools/tsafe/capitalize.js
create mode 100644 tools/tsafe/capitalize.js.map
create mode 100644 tsconfig.tsbuildinfo
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index daf83ff5..00000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-# These are supported funding model platforms
-
-github: [garronej]
-custom: ['https://www.ringerhq.com/experts/garronej']
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
deleted file mode 100644
index c1d833d3..00000000
--- a/.github/workflows/ci.yaml
+++ /dev/null
@@ -1,147 +0,0 @@
-name: ci
-on:
- push:
- branches:
- - main
- pull_request:
- branches:
- - main
-
-jobs:
-
- test_node:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- node: [ '14', '21' ]
- os: [ windows-latest, ubuntu-latest ]
- name: Test with Node v${{ matrix.node }} on ${{ matrix.os }}
- steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-node@v3
- with:
- node-version: ${{ matrix.node }}
- - uses: bahmutov/npm-install@v1
- - run: yarn build
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - run: yarn test:node
- test_deno:
- runs-on: ubuntu-latest
- name: test with Deno
- steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-node@v3
- with:
- node-version: '15'
- - name: Cache
- uses: actions/cache@v3
- with:
- path: ~/.cache/deno
- key: deno-${{ runner.os }}-${{ hashFiles('deno-lock.json') }}
- restore-keys: |
- deno-${{ runner.os }}-${{ hashFiles('deno-lock.json') }}
- deno-${{ runner.os }}-
- deno-
- - uses: denoland/setup-deno@v1
- with:
- deno-version: v1.x
- - run: deno --version
- - uses: bahmutov/npm-install@v1
- - run: yarn build
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - run: yarn test:deno
- check_if_version_upgraded:
- name: Check if version upgrade
- # We run this only if it's a push on the default branch or if it's a PR from a
- # branch (meaning not a PR from a fork). It would be more straightforward to test if secrets.NPM_TOKEN is
- # defined but GitHub Action don't allow it yet.
- if: |
- github.event_name == 'push' ||
- github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
- runs-on: ubuntu-latest
- needs:
- - test_node
- - test_deno
- outputs:
- from_version: ${{ steps.step1.outputs.from_version }}
- to_version: ${{ steps.step1.outputs.to_version }}
- is_upgraded_version: ${{ steps.step1.outputs.is_upgraded_version }}
- is_pre_release: ${{steps.step1.outputs.is_pre_release }}
- steps:
- - uses: garronej/ts-ci@v2.1.0
- id: step1
- with:
- action_name: is_package_json_version_upgraded
- branch: ${{ github.head_ref || github.ref }}
-
- publish:
- runs-on: ubuntu-latest
- needs:
- - check_if_version_upgraded
- # We create a release only if the version have been upgraded and we are on the main branch
- # or if we are on a branch of the repo that has an PR open on main.
- if: |
- needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true' &&
- (
- github.event_name == 'push' ||
- needs.check_if_version_upgraded.outputs.is_pre_release == 'true'
- )
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- ref: ${{ github.ref }}
- - run: rm -r .github
- - name: Remove tmp_branch if it exists
- run: git push origin :tmp_branch || true
- - run: git checkout -b tmp_branch
- - uses: actions/setup-node@v3
- with:
- registry-url: https://registry.npmjs.org/
- - uses: bahmutov/npm-install@v1
- - run: yarn build
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - run: |
- npx -y -p denoify@1.5.6 enable_short_npm_import_path
- npx -y -p denoify@1.5.6 remove_deno_dist_from_gitignore
- env:
- DRY_RUN: "0"
- - run: |
- if [ "$(npm show . version)" = "$VERSION" ]; then
- echo "This version is already published"
- exit 0
- fi
- if [ "$NODE_AUTH_TOKEN" = "" ]; then
- echo "Can't publish on NPM, You must first create a secret called NPM_TOKEN that contains your NPM auth token. https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets"
- false
- fi
- EXTRA_ARGS=""
- if [ "$IS_PRE_RELEASE" = "true" ]; then
- EXTRA_ARGS="--tag next"
- fi
- npm publish $EXTRA_ARGS
- env:
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- VERSION: ${{ needs.check_if_version_upgraded.outputs.to_version }}
- IS_PRE_RELEASE: ${{ needs.check_if_version_upgraded.outputs.is_pre_release }}
- - run: |
- git config --global user.name "actions"
- git config --global user.email actions@github.com
- git add -A
- git commit -am "Adding deno distribution files and moving files from /dist to /"
- git push origin tmp_branch
- - uses: softprops/action-gh-release@v1
- with:
- name: Release v${{ needs.check_if_version_upgraded.outputs.to_version }}
- tag_name: v${{ needs.check_if_version_upgraded.outputs.to_version }}
- target_commitish: tmp_branch
- generate_release_notes: false
- draft: false
- prerelease: ${{ needs.check_if_version_upgraded.outputs.is_pre_release == 'true' }}
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: Remove tmp_branch
- run: git push origin :tmp_branch
diff --git a/.gitignore b/.gitignore
index 7371373f..13be271a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,46 +1,2 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-
-# Runtime data
-pids
-*.pid
-*.seed
-
-# Directory for instrumented libs generated by jscoverage/JSCover
-lib-cov
-
-# Coverage directory used by tools like istanbul
-coverage
-
-# nyc test coverage
-.nyc_output
-
-# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
-.grunt
-
-# node-waf configuration
-.lock-wscript
-
-# Compiled binary addons (http://nodejs.org/api/addons.html)
-build/Release
-
-# Dependency directories
-node_modules
-jspm_packages
-
-# Optional npm cache directory
-.npm
-
-# Optional REPL history
-.node_repl_history
-
-dist/test
-.vscode
-
-.DS_Store
-
-
-/dist
-/deno_dist
\ No newline at end of file
+
+/node_modules
diff --git a/deno_dist/LICENSE b/deno_dist/LICENSE
new file mode 100644
index 00000000..61f220f7
--- /dev/null
+++ b/deno_dist/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 GitHub user u/garronej
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/deno_dist/README.md b/deno_dist/README.md
new file mode 100644
index 00000000..fab8a6b4
--- /dev/null
+++ b/deno_dist/README.md
@@ -0,0 +1,121 @@
+
+
+
+
+ 💧EventEmitter's typesafe replacement 💧
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Home
+ -
+ Documentation
+
+
+---
+
+`'evt'` is intended to be a replacement for `'events'`.
+It makes heavy use of **typescript**'s type inference features to provide **type safety** while keeping things **concise and elegant** 🍸.
+
+Suitable for any JS runtime env (deno, node, old browsers, react-native ...)
+- ✅ It is both a [Deno](https://deno.land/x/evt) and an [NPM](https://www.npmjs.com/evt) module. ( Achieved with [Denoify](https://github.com/garronej/denoify) )
+- ✅ No external dependencies ([`tsafe`](https://github.com/garronej/tsafe), [`run-exclusive`](https://github.com/garronej/run_exclusive) and [`minimal-polyfills`](https://github.com/garronej/minimal_polyfills) are all from the same author as EVT).
+- ✅ [Makes it easy to work with events in React](https://docs.evt.land/react-hooks).
+
+Can be imported in TypeScript projects using version TypeScript >= 3.8 (February 20th, 2020) and in any plain JS projects.
+
+> NOTE: There is very few breaking changes from v1 to v2. [Check them out](https://docs.evt.land/v1-greater-than-v2).
+
+# Who is using it
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Install / Import
+
+## In Deno:
+```typescript
+import { Evt } from "https://deno.land/x/evt/mod.ts";
+```
+## Anywhere else:
+```bash
+$ npm install --save evt
+```
+```typescript
+import { Evt } from "evt";
+```
+
+# Try it
+
+
+
+ Playground
+
+
+# Motivations
+
+There are a lot of things that can't easily be done with `EventEmitter`:
+
+* Enforcing **type safety**.
+* Removing a particular listener ( if the callback is an anonymous function ).
+* Adding a one-time listener for the next event that meets a condition.
+* Waiting \(via a Promise\) for one thing or another to happen.
+_Example: waiting at most one second for the next message, stop waiting if the socket disconnects._
+
+Why would someone pick EVT over RxJS:
+
+* EVT's learning curve is not as steep as RxJS's.
+* Generates code that is easier to grasp for people not familiar with reactive programming.
+
+EVT is an attempt to address all these points while trying to remain as accessible as `EventEmitter`.
+
+
+
+
+ Get Started
+
+
+# The sticker
+
+
+
+
+
+ Shop
+
diff --git a/deno_dist/hooks/index.ts b/deno_dist/hooks/index.ts
new file mode 100644
index 00000000..f2a4672c
--- /dev/null
+++ b/deno_dist/hooks/index.ts
@@ -0,0 +1,9 @@
+/*
+NOTE: In theory react should be a peer dependency
+instead of a dev dependency.
+But given that /hook is just a plugin for using Evt
+with react we don't want to require react to be
+installed to install Evt.
+*/
+export { useEvt } from "./useEvt.ts";
+export { useRerenderOnStateChange } from "./useRerenderOnStateChange.ts";
\ No newline at end of file
diff --git a/deno_dist/hooks/useEvt.ts b/deno_dist/hooks/useEvt.ts
new file mode 100644
index 00000000..3ea7584a
--- /dev/null
+++ b/deno_dist/hooks/useEvt.ts
@@ -0,0 +1,51 @@
+import { Evt } from "../lib/index.ts";
+import type { Ctx } from "../lib/index.ts";
+import React from "https://dev.jspm.io/react@18.2.0";;
+const { useEffect } = React;
+
+
+/**
+ * https://docs.evt.land/api/react-hooks
+ *
+ * Provide a Ctx to attach handlers.
+ * You should list in deps all the Evt that are
+ * susceptible to change ( Evt passed as props
+ * or Evt that are react states ) that you use in the
+ * factoryOrEffect callback.
+ * As for useEffect you should also list every other
+ * value that you use.
+ * Whenever any value in deps is changed factoryOrEffect
+ * is invoked again with the new Evt and the previous handler
+ * get detached.
+ * All handler are also detached when the component unmount.
+ *
+ * factoryOrEffect can be used for attaching handler to event
+ * or to generate a new event that is a merge/pipe of other
+ * Evts.
+ *
+ * BE AWARE: Unlike useEffect factoryOrEffect is called
+ * on render ( like useMemo's callback ).
+ * Remember that you shouldn't update state in a component
+ * render tick (in the useMemo for example). If you you need to
+ * perform an effect on first render (attaching a stateful evt
+ * for example) use registerSideEffect(()=>{ ... })
+ *
+ * Demo: https://docs.evt.land/react-hooks#useevt
+ */
+export function useEvt(
+ effect: (ctx: Ctx) => void,
+ deps?: React.DependencyList
+): void {
+
+ useEffect(
+ ()=> {
+ const ctx= Evt.newCtx();
+
+ effect(ctx);
+
+ return ()=> { ctx.done(); };
+ },
+ deps
+ );
+
+}
diff --git a/deno_dist/hooks/useRerenderOnStateChange.ts b/deno_dist/hooks/useRerenderOnStateChange.ts
new file mode 100644
index 00000000..cf3b8e4c
--- /dev/null
+++ b/deno_dist/hooks/useRerenderOnStateChange.ts
@@ -0,0 +1,27 @@
+import { useEvt } from "./useEvt.ts";
+import React from "https://dev.jspm.io/react@18.2.0";;
+const { useState } = React;
+
+type CtxLike = import("../lib/types/interfaces/CtxLike.ts").CtxLike;
+
+interface StatefulReadonlyEvtLike {
+ state: unknown;
+ attach: (ctx: CtxLike, cb: (state: unknown)=> void)=> void;
+};
+
+/**
+ * https://docs.evt.land/react-hooks#usererenderonstatechange
+ *
+ * To use StatefulEvt as react component state.
+ * */
+export function useRerenderOnStateChange(evt: StatefulReadonlyEvtLike): void {
+
+ //NOTE: We use function in case the state is a function
+ const [, setState] = useState(() => evt.state);
+
+ useEvt(
+ ctx =>
+ evt.attach(ctx, state => setState(() => state)),
+ [evt]
+ );
+}
diff --git a/deno_dist/lib/Ctx.ts b/deno_dist/lib/Ctx.ts
new file mode 100644
index 00000000..eb88eb40
--- /dev/null
+++ b/deno_dist/lib/Ctx.ts
@@ -0,0 +1,166 @@
+import { assert } from "https://deno.land/x/tsafe@v1.6.6/assert.ts";;
+import { is } from "https://deno.land/x/tsafe@v1.6.6/is.ts";
+import { LazyEvt } from "./LazyEvt.ts";
+import { importProxy } from "./importProxy.ts";
+import { overwriteReadonlyProp } from "https://deno.land/x/tsafe@v1.6.6/lab/overwriteReadonlyProp.ts";
+
+import type {
+ Handler,
+ NonPostableEvtLike,
+ Evt,
+ CtxLike,
+ DoneOrAborted
+} from "./types/index.ts";
+
+export type Ctx = import("./types/interfaces/index.ts").Ctx;
+
+class CtxImpl implements Ctx{
+
+
+ get evtDoneOrAborted(): Evt> {
+ return this.lazyEvtDoneOrAborted.evt;
+ }
+
+ get evtAttach(): Evt> {
+ return this.lazyEvtAttach.evt;
+ }
+
+ get evtDetach(): Evt> {
+ return this.lazyEvtDetach.evt;
+ }
+
+ private __completionStatus: DoneOrAborted | undefined;
+
+ get completionStatus(): DoneOrAborted | undefined {
+ return this.__completionStatus;
+ }
+
+
+ private lazyEvtAttach = new LazyEvt>();
+ private lazyEvtDetach = new LazyEvt>();
+ private lazyEvtDoneOrAborted = new LazyEvt>();
+
+ private onDoneOrAborted(doneOrAborted: DoneOrAborted): void {
+
+ this.__completionStatus = doneOrAborted;
+
+ this.lazyEvtDoneOrAborted.post(doneOrAborted);
+ }
+
+ waitFor(timeout?: number): Promise {
+ return this.evtDoneOrAborted
+ .waitFor(timeout)
+ .then(
+ data => {
+ if (data.type === "ABORTED") {
+ throw data.error;
+ }
+ return data.result;
+ },
+ timeoutError => {
+ this.abort(timeoutError);
+ throw timeoutError;
+ }
+ )
+ ;
+ }
+
+
+ abort(error: Error) {
+ return this.__done(error);
+ }
+
+ done(result: Result) {
+ return this.__done(undefined, result);
+ }
+
+ /** Detach all handler bound to this context from theirs respective Evt and post getEvtDone() */
+ private __done(error: Error | undefined, result?: Result): Handler.WithEvt[] {
+
+ const handlers: Handler.WithEvt[] = [];
+
+ for (const handler of this.handlers.values()) {
+
+ const evt = this.evtByHandler.get(handler)!;
+
+ const wasStillAttached = handler.detach();
+
+ //NOTE: It should not be possible
+ if (!wasStillAttached) {
+ continue;
+ }
+
+ handlers.push({ handler, evt });
+ }
+
+ this.onDoneOrAborted({
+ ...(!!error ?
+ { type: "ABORTED", error } :
+ { type: "DONE", "result": result as NonNullable }
+ ),
+ handlers
+ });
+
+
+ return handlers;
+
+ }
+
+ private handlers = new Set<
+ Handler>
+ >();
+ private evtByHandler = new WeakMap<
+ Handler>,
+ NonPostableEvtLike
+ >();
+
+ getHandlers(): Handler.WithEvt[] {
+ return Array.from(this.handlers.values())
+ .map(handler => ({ handler, "evt": this.evtByHandler.get(handler)! }))
+ ;
+ }
+
+
+ zz__addHandler(
+ handler: Handler>,
+ evt: NonPostableEvtLike
+ ) {
+ assert(handler.ctx === this);
+ assert(is>>(handler));
+
+ if( this.completionStatus !== undefined ){
+ handler.detach();
+ return;
+ }
+
+ this.handlers.add(handler);
+ this.evtByHandler.set(handler, evt);
+ this.lazyEvtAttach.post({ handler, evt });
+ }
+
+ zz__removeHandler(
+ handler: Handler>,
+ ) {
+ assert(handler.ctx === this);
+ assert(is>>(handler));
+
+ this.lazyEvtDetach.post({
+ handler,
+ "evt": this.evtByHandler.get(handler)!
+ });
+
+ this.handlers.delete(handler);
+ }
+
+}
+
+export const Ctx: {
+ new (): Ctx;
+ readonly prototype: Ctx;
+} = CtxImpl;
+
+try{ overwriteReadonlyProp(Ctx as any, "name", "Ctx"); }catch{}
+
+importProxy.Ctx = Ctx;
+
+
diff --git a/deno_dist/lib/Evt.asNonPostable.ts b/deno_dist/lib/Evt.asNonPostable.ts
new file mode 100644
index 00000000..e71461fc
--- /dev/null
+++ b/deno_dist/lib/Evt.asNonPostable.ts
@@ -0,0 +1,7 @@
+
+import type { ToNonPostableEvt, NonPostableEvtLike } from "./types/index.ts";
+
+/** https://docs.evt.land/api/evt/asnonpostable */
+export function asNonPostable>(evt: E): ToNonPostableEvt{
+ return evt as any;
+}
\ No newline at end of file
diff --git a/deno_dist/lib/Evt.asPostable.ts b/deno_dist/lib/Evt.asPostable.ts
new file mode 100644
index 00000000..e0fafe6f
--- /dev/null
+++ b/deno_dist/lib/Evt.asPostable.ts
@@ -0,0 +1,11 @@
+import type { NonPostableEvtLike, ToPostableEvt } from "./types/index.ts";
+
+/**
+ * @deprecated: ⚠ UNSAFE ⚠ - Please don't use it, it will be removed in the next
+ * major release.
+ * https://docs.evt.land/api/evt/aspostable
+ * */
+export function asPostable>(evt: E): ToPostableEvt{
+ return evt as any;
+}
+
diff --git a/deno_dist/lib/Evt.asyncPipe.ts b/deno_dist/lib/Evt.asyncPipe.ts
new file mode 100644
index 00000000..ac4c3fb6
--- /dev/null
+++ b/deno_dist/lib/Evt.asyncPipe.ts
@@ -0,0 +1,77 @@
+
+import type { Evt } from "./Evt.ts";
+import type { StatefulEvt, UnpackEvt, NonPostableEvtLike, StatefulReadonlyEvtLike } from "./types/index.ts";
+import type { PromiseOrNot } from "https://deno.land/x/tsafe@v1.6.6/lab/PromiseOrNot.ts";
+import { importProxy } from "./importProxy.ts";
+
+
+
+/**
+ * NOTE: Workaround until v2.0 where .pipe() will support async operators
+ * Usage example: https://stackblitz.com/edit/evt-async-op?file=index.ts
+ *
+ * When the argument is a StatefulEvt:
+ * If, wile asyncOp was running, the state of the source evt
+ * have changed then the result will be discarded.
+ *
+ * If the asyncOp complete synchronously (meaning it does not return
+ * a promise) then the result is synchronously transformed. (As with .pipe() )
+ *
+ * More usage example in src/test/test95.ts
+ */
+export function asyncPipe, U>(
+ evt: E,
+ asyncOp: (data: UnpackEvt) => PromiseOrNot<[U] | null>
+):
+ E extends StatefulReadonlyEvtLike ? StatefulEvt : Evt
+{
+
+ const out = "state" in evt ?
+ importProxy.Evt.create | undefined>(undefined) :
+ importProxy.Evt.create>();
+
+ let currentCallCount = 0;
+
+ evt.attach(async (data: UnpackEvt) => {
+
+ currentCallCount++;
+
+ const thisCallCount = currentCallCount;
+
+ const prOpResult = asyncOp(data);
+
+ let opResult: [U] | null;
+
+ if (
+ prOpResult !== null &&
+ "then" in prOpResult
+ ) {
+
+ opResult = await prOpResult;
+
+ if (
+ "state" in evt &&
+ thisCallCount !== currentCallCount
+ ) {
+ return;
+ }
+
+ } else {
+
+ opResult = prOpResult;
+
+ }
+
+ if (!opResult) {
+
+ return;
+ }
+
+ out.post(opResult[0] as any);
+
+ });
+
+ return out as any;
+
+}
+
diff --git a/deno_dist/lib/Evt.create.ts b/deno_dist/lib/Evt.create.ts
new file mode 100644
index 00000000..50f9dc3d
--- /dev/null
+++ b/deno_dist/lib/Evt.create.ts
@@ -0,0 +1,22 @@
+
+import { importProxy } from "./importProxy.ts";
+import type { Evt, StatefulEvt, NonPostableEvtLike, UnpackEvt } from "./types/index.ts";
+
+export function create | undefined = NonPostableEvtLike>(): Evt>;
+/**
+ * https://docs.evt.land/api/evt/create
+ * Return a new Evt instance.
+ */
+export function create(): Evt;
+/**
+ * https://docs.evt.land/api/evt/create
+ * Return a new StatefulEvt instance.
+ */
+export function create(initialState: T ): StatefulEvt;
+export function create | undefined>(initialState: UnpackEvt ): StatefulEvt>;
+export function create(...args: [] | [any] ): Evt | StatefulEvt {
+ return args.length === 0 ?
+ new importProxy.Evt() :
+ new importProxy.StatefulEvt(args[0])
+ ;
+}
\ No newline at end of file
diff --git a/deno_dist/lib/Evt.factorize.ts b/deno_dist/lib/Evt.factorize.ts
new file mode 100644
index 00000000..ef427d50
--- /dev/null
+++ b/deno_dist/lib/Evt.factorize.ts
@@ -0,0 +1,14 @@
+import type { FactorizeEvt, NonPostableEvtLike } from "./types/index.ts";
+
+/** https://docs.evt.land/api/evt/factorize */
+export function factorize>(
+ evt: E
+): FactorizeEvt {
+ return evt as any;
+}
+
+/*
+import { Evt } from "./Evt.ts";
+const x: Evt = loosenType(new Evt()); x;
+const y: Evt = loosenType(new Evt()); y;
+*/
\ No newline at end of file
diff --git a/deno_dist/lib/Evt.from.ts b/deno_dist/lib/Evt.from.ts
new file mode 100644
index 00000000..067dfbbf
--- /dev/null
+++ b/deno_dist/lib/Evt.from.ts
@@ -0,0 +1,335 @@
+import { id } from "https://deno.land/x/tsafe@v1.6.6/id.ts";
+import { assert } from "https://deno.land/x/tsafe@v1.6.6/assert.ts";;
+import { typeGuard } from "https://deno.land/x/tsafe@v1.6.6/typeGuard.ts";
+import { mergeImpl } from "./Evt.merge.ts";
+import { importProxy } from "./importProxy.ts";
+import type { dom, Evt, NonPostableEvtLike } from "./types/index.ts";
+import type { EventTargetLike } from "./types/index.ts";
+import * as nsEventTargetLike from "./types/EventTargetLike.ts";
+const { EventTargetLike: EventTargetLikeAsValue } = nsEventTargetLike;
+import type { ObserverConstructor } from "./types/Observer.ts";
+
+type OneOrMany = T | ArrayLike;
+type CtxLike = import("./types/index.ts").CtxLike & {
+ evtDoneOrAborted: NonPostableEvtLike & { postCount: number; attachOnce(callback: () => void): void; };
+};
+
+function fromImplForTargetEventLike(
+ ctx: CtxLike | undefined,
+ target: OneOrMany> | PromiseLike,
+ eventName?: string,
+ options?: EventTargetLike.HasEventTargetAddRemove.Options
+): Evt {
+
+ const matchEventTargetLike =
+ (target_: typeof target): target_ is EventTargetLike =>
+ EventTargetLikeAsValue.canBe(target_);
+
+ if (!matchEventTargetLike(target)) {
+
+ if ("then" in target) {
+
+ const evt = new importProxy.Evt();
+
+ const isCtxDone = (() => {
+
+ const getEvtDonePostCount = () => ctx?.evtDoneOrAborted.postCount;
+
+ const n = getEvtDonePostCount();
+
+ return () => n !== getEvtDonePostCount();
+
+ })();
+
+ target.then(data => {
+
+ if (isCtxDone()) {
+ return;
+ }
+
+ evt.post(data);
+
+ });
+
+ return evt;
+
+ }
+
+ return mergeImpl>(
+ ctx,
+ Array.from(target).map(
+ target => fromImplForTargetEventLike(ctx, target, eventName, options)
+ )
+ );
+
+ }
+
+ type ProxyMethod = (
+ listener: (data: T) => void,
+ eventName: string,
+ options?: EventTargetLike.HasEventTargetAddRemove.Options
+ ) => void;
+
+ let proxy: {
+ on: ProxyMethod;
+ off: ProxyMethod;
+ };
+
+ if (EventTargetLikeAsValue.HasEventTargetAddRemove.match(target)) {
+ proxy = {
+ "on": (listener, eventName, options) => target.addEventListener(eventName, listener, options),
+ "off": (listener, eventName, options) => target.removeEventListener(eventName, listener, options)
+ };
+ } else if (EventTargetLikeAsValue.NodeStyleEventEmitter.match(target)) {
+ proxy = {
+ "on": (listener, eventName) => target.addListener(eventName, listener),
+ "off": (listener, eventName) => target.removeListener(eventName, listener)
+ };
+ } else if (EventTargetLikeAsValue.JQueryStyleEventEmitter.match(target)) {
+ proxy = {
+ "on": (listener, eventName) => target.on(eventName, listener),
+ "off": (listener, eventName) => target.off(eventName, listener)
+ };
+ } else if (EventTargetLikeAsValue.RxJSSubject.match(target)) {
+
+ let subscription: EventTargetLike.RxJSSubject.Subscription;
+
+ proxy = {
+ "on": listener => subscription = target.subscribe(data => listener(data)),
+ "off": () => subscription.unsubscribe()
+ };
+
+ } else {
+
+ id(target);
+ assert(false);
+
+ }
+
+ const evt = new importProxy.Evt();
+
+ const listener = (data: T) => evt.post(data);
+
+ ctx?.evtDoneOrAborted.attachOnce(
+ () => proxy.off(
+ listener,
+ eventName!,
+ options
+ )
+ );
+
+ proxy.on(listener, eventName!, options);
+
+ return evt;
+
+}
+
+function fromImplForObserver(
+ ctx: CtxLike | undefined,
+ ObserverConstructor: ObserverConstructor,
+ target: Target
+): Evt {
+
+ const evt = importProxy.Evt.create();
+
+ const listener = ([entry]: Entry[]) => evt.post(entry);
+
+ const observer = new ObserverConstructor(listener);
+
+ observer.observe(target);
+
+ ctx?.evtDoneOrAborted.attachOnce(
+ () => observer.disconnect()
+ );
+
+ return evt;
+
+}
+
+/** https://docs.evt.land/api/evt/from */
+export function from(
+ ctx: CtxLike,
+ target: EventTargetLike.HTMLElement,
+ eventName: K,
+ options?: EventTargetLike.HasEventTargetAddRemove.Options
+): Evt;
+
+export function from(
+ ctx: CtxLike,
+ target: EventTargetLike.Window,
+ eventName: K,
+ options?: EventTargetLike.HasEventTargetAddRemove.Options
+): Evt;
+
+export function from(
+ ctx: CtxLike,
+ target: EventTargetLike.Document,
+ eventName: K,
+ options?: EventTargetLike.HasEventTargetAddRemove.Options
+): Evt;
+
+export function from(
+ ctx: CtxLike,
+ target: OneOrMany<
+ EventTargetLike.NodeStyleEventEmitter |
+ EventTargetLike.JQueryStyleEventEmitter
+ >,
+ eventName: string
+): Evt;
+export function from(
+ ctx: CtxLike,
+ target: OneOrMany<
+ EventTargetLike.HasEventTargetAddRemove
+ >,
+ eventName: string,
+ options?: EventTargetLike.HasEventTargetAddRemove.Options
+): Evt;
+export function from(
+ ctx: CtxLike,
+ target: OneOrMany>
+): Evt;
+
+export function from(
+ ctx: CtxLike,
+ target: PromiseLike
+): Evt;
+
+export function from(
+ ctx: CtxLike,
+ ObserverConstructor: ObserverConstructor,
+ target: Target
+): Evt;
+
+
+export function from(
+ target: EventTargetLike.HTMLElement,
+ eventName: K,
+ options?: EventTargetLike.HasEventTargetAddRemove.Options
+): Evt;
+export function from(
+ target: EventTargetLike.Window,
+ eventName: K,
+ options?: EventTargetLike.HasEventTargetAddRemove.Options
+): Evt;
+export function from(
+ target: EventTargetLike.Document,
+ eventName: K,
+ options?: EventTargetLike.HasEventTargetAddRemove.Options
+): Evt;
+export function from(
+ target: OneOrMany<
+ EventTargetLike.NodeStyleEventEmitter |
+ EventTargetLike.JQueryStyleEventEmitter
+ >,
+ eventName: string
+): Evt;
+export function from(
+ target: OneOrMany<
+ EventTargetLike.HasEventTargetAddRemove
+ >,
+ eventName: string,
+ options?: EventTargetLike.HasEventTargetAddRemove.Options
+): Evt;
+export function from(
+ target: OneOrMany>
+): Evt;
+export function from(
+ target: PromiseLike
+): Evt;
+
+export function from(
+ ObserverConstructor: ObserverConstructor,
+ target: Target
+): Evt;
+/*
+/^[A-Z]/.test(targetOrEventNameOrObserverConstructorOrObserverTarget.name
+ */
+
+export function from(
+ ctxOrTargetOrObserverConstructor: CtxLike | OneOrMany> | PromiseLike | ObserverConstructor,
+ targetOrEventNameOrObserverConstructorOrObserverTarget?: OneOrMany> | string | PromiseLike | ObserverConstructor | ObserverTarget,
+ eventNameOrOptionsOrObserverTarget?: string | EventTargetLike.HasEventTargetAddRemove.Options | ObserverTarget,
+ options?: EventTargetLike.HasEventTargetAddRemove.Options
+): Evt {
+
+ if ("evtDoneOrAborted" in ctxOrTargetOrObserverConstructor) {
+
+ assert(
+ typeGuard> | PromiseLike | ObserverConstructor>(targetOrEventNameOrObserverConstructorOrObserverTarget, true) &&
+ typeGuard(eventNameOrOptionsOrObserverTarget, true) &&
+ typeGuard(options, true)
+ );
+
+ if (typeof targetOrEventNameOrObserverConstructorOrObserverTarget === "function") {
+
+ assert(
+ typeGuard(eventNameOrOptionsOrObserverTarget, true) &&
+ typeGuard(options, true)
+ );
+
+ return fromImplForObserver(
+ ctxOrTargetOrObserverConstructor,
+ targetOrEventNameOrObserverConstructorOrObserverTarget,
+ eventNameOrOptionsOrObserverTarget
+ );
+
+ } else {
+
+ assert(
+ typeGuard>(eventNameOrOptionsOrObserverTarget, true)
+ );
+
+ return fromImplForTargetEventLike(
+ ctxOrTargetOrObserverConstructor,
+ targetOrEventNameOrObserverConstructorOrObserverTarget,
+ eventNameOrOptionsOrObserverTarget,
+ options
+ );
+
+ }
+
+
+ } else {
+
+ assert(
+ typeGuard>>(ctxOrTargetOrObserverConstructor, true) &&
+ typeGuard(targetOrEventNameOrObserverConstructorOrObserverTarget, true) &&
+ typeGuard(eventNameOrOptionsOrObserverTarget, true)
+ );
+
+ if (typeof ctxOrTargetOrObserverConstructor === "function") {
+
+ assert(
+ typeGuard(targetOrEventNameOrObserverConstructorOrObserverTarget, true) &&
+ typeGuard(eventNameOrOptionsOrObserverTarget, true)
+ );
+
+ return fromImplForObserver(
+ undefined,
+ ctxOrTargetOrObserverConstructor,
+ targetOrEventNameOrObserverConstructorOrObserverTarget
+ );
+
+
+ } else {
+
+ assert(
+ typeGuard>(
+ targetOrEventNameOrObserverConstructorOrObserverTarget, true
+ )
+ );
+
+ return fromImplForTargetEventLike(
+ undefined,
+ ctxOrTargetOrObserverConstructor,
+ targetOrEventNameOrObserverConstructorOrObserverTarget,
+ eventNameOrOptionsOrObserverTarget
+ );
+
+ }
+
+
+
+ }
+
+}
diff --git a/deno_dist/lib/Evt.getCtx.ts b/deno_dist/lib/Evt.getCtx.ts
new file mode 100644
index 00000000..00682ce7
--- /dev/null
+++ b/deno_dist/lib/Evt.getCtx.ts
@@ -0,0 +1,33 @@
+import { importProxy } from "./importProxy.ts";
+import type { Ctx } from "./types/index.ts";
+
+/**
+ * https://docs.evt.land/api/evt/getctx
+ *
+ * Evt.getCtx(obj) an instance of Ctx, always the same for a given object.
+ * No strong reference to the object is created
+ * when the object is no longer referenced it's associated Ctx will be freed from memory.
+ */
+export function getCtxFactory() {
+
+ const ctxByObj = new WeakMap();
+
+ function getCtx(obj: object): Ctx {
+
+ let ctx = ctxByObj.get(obj);
+
+ if (ctx === undefined) {
+
+ ctx = (new importProxy.Ctx());
+
+ ctxByObj.set(obj, ctx);
+
+ }
+
+ return ctx;
+
+ }
+
+ return getCtx;
+
+}
diff --git a/deno_dist/lib/Evt.loosenType.ts b/deno_dist/lib/Evt.loosenType.ts
new file mode 100644
index 00000000..e31370f6
--- /dev/null
+++ b/deno_dist/lib/Evt.loosenType.ts
@@ -0,0 +1,20 @@
+import type { SwapEvtType, UnpackEvt, NonPostableEvtLike} from "./types/index.ts";
+
+/**
+ * https://docs.evt.land/api/evt/loosentype
+ */
+export function loosenType, SupersetOfT>(
+ evt: E
+): UnpackEvt extends SupersetOfT ?
+ SwapEvtType : "NOT A SUPERSET" {
+ return evt as any;
+}
+
+/*
+import { Evt } from "./Evt.ts";
+const x: Evt = loosenType(new Evt()); x;
+const y: Evt = loosenType(new Evt()); y;
+*/
+
+
+
diff --git a/deno_dist/lib/Evt.merge.ts b/deno_dist/lib/Evt.merge.ts
new file mode 100644
index 00000000..5e5e5867
--- /dev/null
+++ b/deno_dist/lib/Evt.merge.ts
@@ -0,0 +1,51 @@
+
+import { importProxy } from "./importProxy.ts";
+import type { UnpackEvt, Evt, CtxLike, NonPostableEvtLike } from "./types/index.ts";
+
+export function mergeImpl>(
+ ctx: CtxLike | undefined,
+ evts: readonly EvtUnion[]
+): Evt> {
+
+ const evtUnion = new importProxy.Evt>();
+
+ const callback = (data: UnpackEvt) => evtUnion.post(data)
+
+ evts.forEach(
+ evt => {
+
+ if (ctx === undefined) {
+ evt.attach(callback);
+ } else {
+ evt.attach(ctx, callback);
+ }
+
+ }
+ );
+
+ return evtUnion;
+
+}
+
+
+
+/** https://docs.evt.land/api/evt/merge */
+export function merge>(
+ ctx: CtxLike,
+ evts: readonly EvtUnion[]
+): Evt>;
+export function merge>(
+ evts: readonly EvtUnion[]
+): Evt>;
+export function merge>(
+ p1: CtxLike | readonly EvtUnion[],
+ p2?: readonly EvtUnion[]
+): Evt> {
+
+ return "length" in p1 ?
+ mergeImpl(undefined, p1) :
+ mergeImpl(p1, p2!)
+ ;
+
+
+}
\ No newline at end of file
diff --git a/deno_dist/lib/Evt.newCtx.ts b/deno_dist/lib/Evt.newCtx.ts
new file mode 100644
index 00000000..85ab1a15
--- /dev/null
+++ b/deno_dist/lib/Evt.newCtx.ts
@@ -0,0 +1,11 @@
+import { importProxy } from "./importProxy.ts";
+import type { Ctx } from "./Ctx.ts";
+
+/**
+ * https://docs.evt.land/api/evt/newctx
+ *
+ * return a new Ctx instance
+ * */
+export function newCtx(): Ctx{
+ return new importProxy.Ctx();
+}
\ No newline at end of file
diff --git a/deno_dist/lib/Evt.parsePropsFromArgs.ts b/deno_dist/lib/Evt.parsePropsFromArgs.ts
new file mode 100644
index 00000000..c43de038
--- /dev/null
+++ b/deno_dist/lib/Evt.parsePropsFromArgs.ts
@@ -0,0 +1,250 @@
+
+import type { Operator } from "./types/Operator.ts"
+import { id } from "https://deno.land/x/tsafe@v1.6.6/id.ts";
+import { compose } from "./util/compose.ts";
+import { typeGuard } from "https://deno.land/x/tsafe@v1.6.6/typeGuard.ts"
+import type { CtxLike, Handler } from "./types/index.ts";
+
+export function matchAll() { return true; }
+
+const canBeOperator = (p: undefined | CtxLike | Operator): boolean => {
+ return (
+ p !== undefined &&
+ typeGuard>(p, true) &&
+ (
+ typeof p === "function" ||
+ typeof p[0] === "function"
+ )
+ );
+};
+
+const defaultParams: Handler.PropsFromArgs = {
+ "op": matchAll,
+ "ctx": undefined,
+ "timeout": undefined,
+ "callback": undefined
+};
+
+export function parsePropsFromArgs(
+ inputs: readonly any[],
+ methodName: "waitFor" | "attach*" | "pipe"
+): Handler.PropsFromArgs {
+
+ type Out = Handler.PropsFromArgs;
+
+ switch (methodName) {
+ case "pipe": {
+
+ //[]
+ //[undefined] ( not valid but user would expect it to work )
+ //[ ctx, ...op[] ]
+ //[ ...op[] ]
+
+ const getOpWrap = (ops: [Operator, ...Operator[]]) =>
+ ops.length === 0 ?
+ {}
+ :
+ { "op": ops.length === 1 ? ops[0] : compose(...ops) }
+ ;
+
+ if (canBeOperator(inputs[0])) {
+
+ //[ ...op[] ]
+
+ return id({
+ ...defaultParams,
+ ...getOpWrap(inputs as any)
+ });
+
+ } else {
+
+ //[]
+ //[ ctx, ...Operator.fλ[] ]
+
+ const [ctx, ...rest] = inputs;
+
+ return id({
+ ...defaultParams,
+ ...(ctx !== undefined ? { ctx } : {}),
+ ...getOpWrap(rest as any)
+ });
+
+ }
+
+
+ } break;
+
+ case "waitFor": {
+
+ //[ op, ctx, timeout ]
+ //[ op, ctx, undefined ]
+ //[ op, ctx ]
+ //[ op, timeout ]
+ //[ op, undefined ]
+ //[ ctx, timeout ]
+ //[ ctx, undefined ]
+ //[ op ]
+ //[ ctx ]
+ //[ timeout ]
+ //[ undefined ]
+ //[ callback ]
+
+ return parsePropsFromArgs(
+ [
+ //If the last element is undefined, remove it.
+ ...inputs.filter(
+ (value, index) => !(
+ index === inputs.length - 1 &&
+ value === undefined
+ )
+ ),
+ defaultParams.callback
+ ],
+ "attach*"
+ );
+
+ } break;
+ case "attach*": {
+
+ //NOTE: when callback is undefined call has been forward from waitFor.
+
+ //[ op, ctx, timeout, callback ]
+ //[ op, ctx, timeout, undefined ]
+ //[ op, ctx, callback ]
+ //[ op, ctx, undefined ]
+ //[ op, timeout, callback ]
+ //[ op, timeout, undefined ]
+ //[ ctx, timeout, callback ]
+ //[ ctx, timeout, undefined ]
+ //[ op, callback ]
+ //[ op, undefined ]
+ //[ ctx, callback ]
+ //[ ctx, undefined ]
+ //[ timeout, callback ]
+ //[ timeout, undefined ]
+ //[ callback ]
+ //[ undefined ]
+
+ const n = inputs.length as 4 | 3 | 2 | 1 | 0;
+
+ switch (n) {
+ case 4: {
+
+ //[ op, ctx, timeout, callback ]
+ const [p1, p2, p3, p4] = inputs;
+
+ return id({
+ ...defaultParams,
+ "op": p1,
+ "ctx": p2,
+ "timeout": p3,
+ "callback": p4
+ });
+
+ }
+ case 3: {
+
+ //[ op, ctx, callback ]
+ //[ op, timeout, callback ]
+ //[ ctx, timeout, callback ]
+ const [p1, p2, p3] = inputs;
+ if (typeof p2 === "number") {
+ //[ op, timeout, callback ]
+ //[ ctx, timeout, callback ]
+
+ const timeout: Out["timeout"] = p2;
+ const callback: Out["callback"] = p3;
+
+ if (canBeOperator(p1)) {
+ //[ op, timeout, callback ]
+ return id({
+ ...defaultParams,
+ timeout,
+ callback,
+ "op": p1
+ });
+
+ } else {
+ //[ ctx, timeout, callback ]
+
+ return id({
+ ...defaultParams,
+ timeout,
+ callback,
+ "ctx": p1
+ });
+
+ }
+ } else {
+ //[ op, ctx, callback ]
+ return id({
+ ...defaultParams,
+ "op": p1,
+ "ctx": p2,
+ "callback": p3
+ });
+
+ }
+
+ }
+ case 2: {
+
+ //[ op, callback ]
+ //[ ctx, callback ]
+ //[ timeout, callback ]
+ const [p1, p2] = inputs;
+ if (typeof p1 === "number") {
+ //[ timeout, callback ]
+ return id({
+ ...defaultParams,
+ "timeout": p1,
+ "callback": p2
+ });
+ } else {
+ //[ op, callback ]
+ //[ ctx, callback ]
+ const callback: Out["callback"] = p2;
+ if (canBeOperator(p1)) {
+
+ return id({
+ ...defaultParams,
+ callback,
+ "op": p1
+ });
+
+ } else {
+
+ return id({
+ ...defaultParams,
+ callback,
+ "ctx": p1
+ });
+
+ }
+ }
+
+ }
+ case 1: {
+
+ //[ callback ]
+ const [p] = inputs;
+
+ return id({
+ ...defaultParams,
+ "callback": p
+ });
+
+ }
+ case 0: {
+ return id({ ...defaultParams });
+ }
+
+ }
+
+
+ } break;
+
+ }
+
+}
+
diff --git a/deno_dist/lib/Evt.ts b/deno_dist/lib/Evt.ts
new file mode 100644
index 00000000..9804a028
--- /dev/null
+++ b/deno_dist/lib/Evt.ts
@@ -0,0 +1,1060 @@
+import type { LightMap } from "../tools/minimal-polyfills/LightMap.ts";
+import { importProxy } from "./importProxy.ts";
+import { create } from "./Evt.create.ts";
+import { getCtxFactory } from "./Evt.getCtx.ts";
+import { factorize } from "./Evt.factorize.ts";
+import { merge } from "./Evt.merge.ts";
+import { from } from "./Evt.from.ts";
+import { asPostable } from "./Evt.asPostable.ts";
+import { asyncPipe } from "./Evt.asyncPipe.ts";
+import { asNonPostable } from "./Evt.asNonPostable.ts";
+import { parsePropsFromArgs, matchAll } from "./Evt.parsePropsFromArgs.ts";
+import { newCtx } from "./Evt.newCtx.ts";
+import { LazyEvt } from "./LazyEvt.ts";
+import * as runExclusive from "https://deno.land/x/run_exclusive@v2.2.19/mod.ts";
+import { overwriteReadonlyProp } from "https://deno.land/x/tsafe@v1.6.6/lab/overwriteReadonlyProp.ts";
+import { typeGuard } from "https://deno.land/x/tsafe@v1.6.6/typeGuard.ts";
+import { Deferred } from "../tools/Deferred.ts";
+import { loosenType } from "./Evt.loosenType.ts";
+import { safeClearTimeout, safeSetTimeout, Timer } from "../tools/safeSetTimeout.ts";
+import { isPromiseLike } from "https://deno.land/x/tsafe@v1.6.6/isPromiseLike.ts";
+import { DetachedEvtError, TimeoutEvtError } from "./types/EvtError.ts";
+import * as nsCtxLike from "./types/interfaces/CtxLike.ts";
+import type { Handler, Operator, NonPostableEvt, StatefulEvt, NonPostableEvtLike, CtxLike } from "./types/index.ts";
+import { convertOperatorToStatelessFλ } from "./util/convertOperatorToStatelessFLambda.ts";
+import type { AsyncIterableEvt } from "./types/AsyncIterableEvt.ts";
+
+const runSideEffect = (sideEffect: () => void) => sideEffect();
+
+// NOTE: For compat with --no-check
+// https://github.com/asos-craigmorten/opine/issues/97#issuecomment-751806014
+const { CtxLike: CtxLikeAsValue } = nsCtxLike;
+
+/** https://docs.evt.land/api/evt */
+export type Evt = import("./types/interfaces/Evt.ts").Evt;
+
+
+class EvtImpl implements Evt {
+
+ static readonly create = create;
+
+ static readonly newCtx = newCtx;
+
+ static readonly merge = merge;
+
+ static readonly from = from;
+
+ static readonly getCtx = getCtxFactory();
+
+ static readonly loosenType = loosenType;
+
+ static readonly factorize = factorize;
+
+ static readonly asPostable = asPostable;
+
+ static readonly asyncPipe = asyncPipe;
+
+ static readonly asNonPostable = asNonPostable;
+
+ private static __defaultMaxHandlers = 25;
+
+ static setDefaultMaxHandlers(n: number): void {
+ this.__defaultMaxHandlers = isFinite(n) ? n : 0;
+ }
+
+ toStateful(p1: any, p2?: CtxLike): StatefulEvt {
+
+ const isP1Ctx = CtxLikeAsValue.match(p1);
+
+ const initialValue: any = isP1Ctx ? undefined : p1;
+ const ctx = p2 || (isP1Ctx ? p1 : undefined);
+
+ const out = new importProxy.StatefulEvt(initialValue);
+
+ const callback = (data: T) => out.post(data);
+
+ if (!!ctx) {
+ this.attach(ctx, callback);
+ } else {
+ this.attach(callback);
+ }
+
+ return out;
+
+ }
+
+ get evtAttach(): Evt> {
+ return this.lazyEvtAttach.evt;
+ }
+
+ get evtDetach(): Evt> {
+ return this.lazyEvtDetach.evt;
+ }
+
+ private readonly lazyEvtAttach = new LazyEvt>();
+ private readonly lazyEvtDetach = new LazyEvt>();
+
+
+ private __maxHandlers: undefined | number = undefined;
+
+ setMaxHandlers(n: number): this {
+ this.__maxHandlers = isFinite(n) ? n : 0;
+ return this;
+ }
+
+ readonly postCount: number = 0;
+
+ private traceId: string | null = null;
+ private traceFormatter!: (data: T) => string;
+ private log!: Exclude["enableTrace"]>[0]["log"], false>;
+
+ enableTrace(
+ params: {
+ id: string,
+ formatter?: (data: T) => string,
+ log?: ((message?: any, ...optionalParams: any[]) => void) | false
+ }
+ //NOTE: Not typeof console.log as we don't want to expose types from node
+ ): void {
+
+ const { id, formatter, log } = params;
+
+ this.traceId = id;
+
+ this.traceFormatter = formatter || (
+ data => {
+ try {
+ return JSON.stringify(data, null, 2);
+ } catch {
+ return `${data}`;
+ }
+ }
+ );
+
+ this.log =
+ log === undefined ?
+ ((...inputs) => console.log(...inputs)) :
+ log === false ? undefined : log
+ ;
+
+ }
+
+ disableTrace(): this {
+ this.traceId = null;
+ return this;
+ }
+
+ private readonly handlers: Handler[] = [];
+
+ private readonly handlerTriggers: LightMap<
+ Handler,
+ (opResult: readonly [any]) => PromiseLike | undefined
+ > = new Map();
+
+
+ //NOTE: An async handler ( attached with waitFor ) is only eligible to handle a post if the post
+ //occurred after the handler was set. We don't want to waitFor event from the past.
+ //private readonly asyncHandlerChronologyMark = new WeakMap();
+ private get asyncHandlerChronologyMark(): WeakMap<
+ Handler.PropsFromMethodName.Async,
+ number
+ > {
+ return ((this as any)["~internal"] ??= {})["asyncHandlerChronologyMark"] ??= new WeakMap();
+ }
+
+ //NOTE: There is an exception to the above rule, we want to allow async waitFor loop
+ //do so we have to handle the case where multiple event would be posted synchronously.
+ private get asyncHandlerChronologyExceptionRange(): WeakMap<
+ Handler.PropsFromMethodName.Async,
+ { lowerMark: number; upperMark: number; }
+ > {
+ return ((this as any)["~internal"] ??= {})["asyncHandlerChronologyExceptionRange"] ??= new WeakMap();
+ }
+
+
+ private get invocableOpByOp(): WeakMap<
+ Operator,
+ Operator.fλ.Stateless
+ > {
+ return ((this as any)["~internal"] ??= {})["invocableOpByOp"] ??= new WeakMap();
+ }
+
+ getInvocableOp(op: Operator): Operator.fλ.Stateless {
+
+ const invocableOp = this.invocableOpByOp.get(op);
+
+ if (invocableOp === undefined) {
+ throw new Error([
+ "Provided operator isn't the operator of any handler",
+ "currently attached to the Evt instance"
+ ].join(" "));
+ }
+
+ return invocableOp;
+
+ }
+
+ /*
+ NOTE: Used as Date.now() would be used to compare if an event is anterior
+ or posterior to an other. We don't use Date.now() because two call within
+ less than a ms will return the same value unlike this function.
+ */
+ private __currentChronologyMark = 0;
+ private getChronologyMark() {
+ return this.__currentChronologyMark++;
+ }
+
+
+ private asyncHandlerCount: number = 0;
+
+ private detachHandler(
+ handler: Handler,
+ wTimer: [Timer | undefined],
+ rejectPr: (error: DetachedEvtError) => void
+ ) {
+
+ const index = this.handlers.indexOf(handler);
+
+ if (index < 0) {
+ return false;
+ }
+
+ if (typeGuard>>(handler, !!handler.ctx)) {
+ handler.ctx.zz__removeHandler(handler);
+ }
+
+
+ this.handlers.splice(index, 1);
+
+ if (handler.async) {
+ this.asyncHandlerCount--;
+ }
+
+ this.handlerTriggers.delete(handler);
+
+ if (wTimer[0] !== undefined) {
+
+ safeClearTimeout(wTimer[0]);
+
+ rejectPr(new DetachedEvtError());
+
+ }
+
+ this.lazyEvtDetach.post(handler);
+
+ return true;
+
+ }
+
+
+ private triggerHandler(
+ handler: Handler,
+ wTimer: [Timer | undefined],
+ resolvePr: ((transformedData: any) => void) | undefined,
+ opResult: readonly [U] //TODO: Or readonly [ any ] ??
+ ): PromiseLike | undefined {
+
+ const { callback, once } = handler;
+
+ if (wTimer[0] !== undefined) {
+ safeClearTimeout(wTimer[0]);
+ wTimer[0] = undefined;
+ }
+
+ if (once) {
+ handler.detach();
+ }
+
+ const [transformedData] = opResult;
+
+ const prOrValue = callback?.call(
+ this,
+ transformedData
+ );
+
+ resolvePr?.(transformedData);
+
+ return isPromiseLike(prOrValue) ? prOrValue : undefined;
+
+ }
+
+ private addHandler(
+ propsFromArgs: Handler.PropsFromArgs,
+ propsFromMethodName: Handler.PropsFromMethodName
+ ): Handler {
+
+ this.invocableOpByOp.set(
+ propsFromArgs.op,
+ convertOperatorToStatelessFλ(propsFromArgs.op)
+ );
+
+ const d = new Deferred();
+
+ const wTimer: [Timer | undefined] = [undefined];
+
+ const handler: Handler = {
+ ...propsFromArgs,
+ ...propsFromMethodName,
+ "detach": () => this.detachHandler(handler, wTimer, d.reject),
+ "promise": d.pr
+ };
+
+ if (typeof handler.timeout === "number") {
+
+ wTimer[0] = safeSetTimeout(() => {
+
+ wTimer[0] = undefined;
+
+ handler.detach();
+
+ d.reject(new TimeoutEvtError(handler.timeout!));
+
+ }, handler.timeout);
+
+ }
+
+ const handlerTrigger: (opResult: readonly [U]) => PromiseLike | undefined
+ = opResult => this.triggerHandler(
+ handler,
+ wTimer,
+ d.isPending ? d.resolve : undefined,
+ opResult
+ );
+
+ this.handlerTriggers.set(
+ handler,
+ handlerTrigger
+ );
+
+ if (handler.async) {
+
+ this.asyncHandlerChronologyMark.set(
+ handler,
+ this.getChronologyMark()
+ );
+
+ }
+
+ if (handler.prepend) {
+
+ let i: number;
+
+ for (i = 0; i < this.handlers.length; i++) {
+
+ if (this.handlers[i].extract) {
+ continue;
+ }
+
+ break;
+
+ }
+
+ this.handlers.splice(i, 0, handler);
+
+ } else {
+
+ this.handlers.push(handler);
+
+ }
+
+ if (handler.async) {
+ this.asyncHandlerCount++;
+ }
+
+ this.checkForPotentialMemoryLeak();
+
+ if (typeGuard>>(handler, !!handler.ctx)) {
+ handler.ctx.zz__addHandler(handler, this);
+ }
+
+ onAddHandlerByEvt.get(this)?.(handler, handlerTrigger);
+
+ //NOTE: Can happen for example if this is a StatefulEvt
+ //and the handler is "once" and the matcher match the state
+ //We don't want to post an attach if the handler is already detached.
+ if (this.handlerTriggers.has(handler)) {
+
+ this.lazyEvtAttach.post(handler);
+
+ }
+
+ return handler;
+
+ }
+
+
+
+ private checkForPotentialMemoryLeak(): void {
+
+ const maxHandlers = this.__maxHandlers !== undefined ?
+ this.__maxHandlers :
+ EvtImpl.__defaultMaxHandlers
+ ;
+
+
+ if (
+ maxHandlers === 0 ||
+ this.handlers.length % (maxHandlers + 1) !== 0) {
+ return;
+ }
+
+ let message = [
+ `MaxHandlersExceededWarning: Possible Evt memory leak detected.`,
+ `${this.handlers.length} handlers attached${this.traceId ? ` to "${this.traceId}"` : ""}.\n`,
+ `Use Evt.prototype.setMaxHandlers(n) to increase limit on a specific Evt.\n`,
+ `Use Evt.setDefaultMaxHandlers(n) to change the default limit currently set to ${EvtImpl.__defaultMaxHandlers}.\n`,
+ ].join("");
+
+ const map = new Map();
+
+ this.getHandlers()
+ .map(({ ctx, async, once, prepend, extract, op, callback }) => ({
+ "hasCtx": !!ctx,
+ once,
+ prepend,
+ extract,
+ "isWaitFor": async,
+ ...(op === matchAll ? {} : { "op": op.toString() }),
+ ...(!callback ? {} : { "callback": callback.toString() })
+ }))
+ .map(obj =>
+ "{\n" + Object.keys(obj)
+ .map(key => ` ${key}: ${(obj as any)[key]}`)
+ .join(",\n") + "\n}"
+ )
+ .forEach(str => map.set(str, (map.has(str) ? map.get(str)! : 0) + 1))
+ ;
+
+ message += "\n" + Array.from(map.keys())
+ .map(str => `${map.get(str)} handler${map.get(str) === 1 ? "" : "s"} like:\n${str}`)
+ .join("\n") + "\n";
+
+ if (this.traceId === null) {
+
+ message += "\n" + [
+ `To validate the identify of the Evt instance that is triggering this warning you can call`,
+ `Evt.prototype.enableTrace({ "id": "My evt id", "log": false }) on the Evt that you suspect.\n`
+ ].join(" ");
+
+ }
+
+ try {
+ console.warn(message);
+ } catch {
+ }
+
+ }
+
+ isHandledByOp(op: Operator, data: T): boolean {
+
+ let hasSideEffect = false;
+
+ let invocableOp: Operator.fλ.Stateless;
+
+ try {
+
+ invocableOp = this.getInvocableOp(op);
+
+ } catch {
+
+ return false;
+
+ }
+
+ const opResult = invocableOp(
+ data,
+ () => hasSideEffect = true
+ );
+
+ return opResult !== null || hasSideEffect;
+
+ }
+
+
+ private trace(data: T) {
+
+ if (this.traceId === null) {
+ return;
+ }
+
+ let message = `(${this.traceId}) `;
+
+ const isExtracted = !!this.handlers.find(
+ ({ extract, op }) => (
+ extract &&
+ this.isHandledByOp(op, data)
+ )
+ );
+
+ if (isExtracted) {
+
+ message += "extracted ";
+
+ } else {
+
+ const handlerCount = this.handlers
+ .filter(
+ ({ extract, op }) => !extract &&
+ this.isHandledByOp(op, data)
+ )
+ .length;
+
+ message += `${handlerCount} handler${(handlerCount > 1) ? "s" : ""}, `;
+
+ }
+
+ this.log?.(message + this.traceFormatter(data));
+
+ }
+
+ /** Return [ isExtracted, prAllHandlerCallbacksResolved ] */
+ private postSync(data: T): readonly [boolean, Promise] {
+
+ const prAllHandlerCallbacksResolved: PromiseLike[] = [];
+
+ const getReturnValue = (isExtracted: boolean) => [
+ isExtracted,
+ Promise.all(prAllHandlerCallbacksResolved).then(() => { })
+ ] as const;
+
+
+ for (const handler of [...this.handlers]) {
+
+ const { async, op, extract } = handler;
+
+ if (async) {
+ continue;
+ }
+
+ //NOTE: If detached while executing the operator
+ //we still want to trigger the handler.
+ const handlerTrigger = this.handlerTriggers.get(handler);
+
+ const opResult = this.getInvocableOp(op)(
+ data,
+ runSideEffect
+ );
+
+ if (opResult === null) {
+ continue;
+ }
+
+ //NOTE: Possible if detached while in the loop.
+ if (!handlerTrigger) {
+ continue;
+ }
+
+ const prOrUndefined = handlerTrigger(opResult);
+
+ if (prOrUndefined !== undefined) {
+ prAllHandlerCallbacksResolved.push(prOrUndefined);
+ }
+
+ if (extract) {
+ return getReturnValue(true);
+ }
+
+ }
+
+ return getReturnValue(false);
+
+ }
+
+ private postAsyncFactory() {
+ return runExclusive.buildMethodCb(
+ (data: T, postChronologyMark: number, releaseLock?) => {
+
+ if (this.asyncHandlerCount === 0) {
+ releaseLock();
+ return;
+ }
+
+ const promises: Promise[] = [];
+
+ let chronologyMarkStartResolveTick: number;
+
+ //NOTE: Must be before handlerTrigger call.
+ Promise.resolve().then(
+ () => chronologyMarkStartResolveTick = this.getChronologyMark()
+ );
+
+
+ for (const handler of [...this.handlers]) {
+
+ if (!handler.async) {
+ continue;
+ }
+
+ const opResult = this.getInvocableOp(handler.op)(
+ data,
+ runSideEffect
+ );
+
+ if (opResult === null) {
+ continue;
+ }
+
+ const handlerTrigger = this.handlerTriggers.get(handler);
+
+ if (!handlerTrigger) {
+ continue;
+ }
+
+ const shouldCallHandlerTrigger = (() => {
+
+ const handlerMark = this.asyncHandlerChronologyMark.get(handler)!;
+
+ if (postChronologyMark > handlerMark) {
+ return true;
+ }
+
+ const exceptionRange = this.asyncHandlerChronologyExceptionRange.get(handler);
+
+ return (
+ exceptionRange !== undefined &&
+ exceptionRange.lowerMark < postChronologyMark &&
+ postChronologyMark < exceptionRange.upperMark &&
+ handlerMark > exceptionRange.upperMark
+ );
+
+ })();
+
+ if (!shouldCallHandlerTrigger) {
+ continue;
+ }
+
+ promises.push(
+ new Promise(
+ resolve => handler.promise
+ .then(() => resolve())
+ .catch(() => resolve())
+ )
+ );
+
+ handlerTrigger(opResult);
+
+
+ }
+
+ if (promises.length === 0) {
+ releaseLock();
+ return;
+ }
+
+ const handlersDump = [...this.handlers];
+
+ Promise.all(promises).then(() => {
+
+ for (const handler of this.handlers) {
+
+ if (!handler.async) {
+ continue;
+ }
+
+ if (handlersDump.indexOf(handler) >= 0) {
+ continue;
+ }
+
+ this.asyncHandlerChronologyExceptionRange.set(
+ handler,
+ {
+ "lowerMark": postChronologyMark,
+ "upperMark": chronologyMarkStartResolveTick
+ }
+ );
+
+ }
+
+ releaseLock();
+
+ });
+
+ }
+ );
+ }
+
+ declare private postAsync: (
+ (
+ data: T,
+ postChronologyMark: number
+ ) => void
+ ) | undefined;
+
+ private static readonly propsFormMethodNames: Record<
+ "waitFor" | "attach" | "attachExtract" | "attachPrepend" | "attachOnce" |
+ "attachOncePrepend" | "attachOnceExtract"
+ ,
+ Handler.PropsFromMethodName
+ > = {
+ "waitFor": { "async": true, "extract": false, "once": true, "prepend": false },
+ "attach": { "async": false, "extract": false, "once": false, "prepend": false },
+ "attachExtract": { "async": false, "extract": true, "once": false, "prepend": true },
+ "attachPrepend": { "async": false, "extract": false, "once": false, "prepend": true },
+ "attachOnce": { "async": false, "extract": false, "once": true, "prepend": false },
+ "attachOncePrepend": { "async": false, "extract": false, "once": true, "prepend": true },
+ "attachOnceExtract": { "async": false, "extract": true, "once": true, "prepend": true }
+ };
+
+ isHandled(data: T): boolean {
+ return !!this.getHandlers()
+ .find(({ op }) => this.isHandledByOp(op, data))
+ ;
+ }
+
+ getHandlers(): Handler[] {
+ return [...this.handlers];
+ }
+
+ detach(ctx?: CtxLike): Handler[] {
+
+ const detachedHandlers: Handler[] = [];
+
+ for (const handler of this.getHandlers()) {
+
+ if (ctx !== undefined && handler.ctx !== ctx) {
+ continue;
+ }
+
+ const wasStillAttached = handler.detach();
+
+ //NOTE: It should not be possible.
+ if (!wasStillAttached) {
+ continue;
+ }
+
+ detachedHandlers.push(handler);
+
+ }
+
+ return detachedHandlers;
+
+ }
+
+ pipe(...args: any[]): Evt {
+
+ const evtDelegate = new EvtImpl();
+
+ this.addHandler(
+ {
+ ...parsePropsFromArgs