fp-pack 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/fp-pack.umd.js +1 -1
- package/dist/fp-pack.umd.js.map +1 -1
- package/dist/implement/async/pipeAsync.d.ts +11 -0
- package/dist/implement/async/pipeAsync.d.ts.map +1 -1
- package/dist/implement/async/pipeAsync.mjs.map +1 -1
- package/dist/implement/async/pipeAsyncSideEffect.d.ts +11 -0
- package/dist/implement/async/pipeAsyncSideEffect.d.ts.map +1 -1
- package/dist/implement/async/pipeAsyncSideEffect.mjs.map +1 -1
- package/dist/implement/composition/compose.d.ts +25 -9
- package/dist/implement/composition/compose.d.ts.map +1 -1
- package/dist/implement/composition/compose.mjs.map +1 -1
- package/dist/implement/composition/compose.type-test.d.ts +35 -0
- package/dist/implement/composition/compose.type-test.d.ts.map +1 -0
- package/dist/implement/composition/compose.util.type-test.d.ts +31 -0
- package/dist/implement/composition/compose.util.type-test.d.ts.map +1 -0
- package/dist/implement/composition/index.d.ts +1 -0
- package/dist/implement/composition/index.d.ts.map +1 -1
- package/dist/implement/composition/pipe.type-test.d.ts +110 -0
- package/dist/implement/composition/pipe.type-test.d.ts.map +1 -1
- package/dist/implement/composition/pipe.util.type-test.d.ts +75 -0
- package/dist/implement/composition/pipe.util.type-test.d.ts.map +1 -0
- package/dist/implement/composition/tap0.d.ts +6 -0
- package/dist/implement/composition/tap0.d.ts.map +1 -0
- package/dist/implement/composition/tap0.mjs +9 -0
- package/dist/implement/composition/tap0.mjs.map +1 -0
- package/dist/index.mjs +230 -228
- package/dist/index.mjs.map +1 -1
- package/dist/skills/fp-pack/SKILL.md +2 -1
- package/dist/skills/fp-pack.md +2 -1
- package/package.json +1 -1
- package/src/implement/async/pipeAsync.ts +71 -0
- package/src/implement/async/pipeAsyncSideEffect.ts +74 -0
- package/src/implement/composition/compose.test.ts +14 -0
- package/src/implement/composition/compose.ts +133 -21
- package/src/implement/composition/compose.type-test.ts +109 -0
- package/src/implement/composition/compose.util.type-test.ts +128 -0
- package/src/implement/composition/index.ts +1 -0
- package/src/implement/composition/pipe.type-test.ts +252 -0
- package/src/implement/composition/pipe.util.type-test.ts +256 -0
- package/src/implement/composition/tap0.test.ts +16 -0
- package/src/implement/composition/tap0.ts +10 -0
package/dist/index.mjs
CHANGED
|
@@ -10,246 +10,248 @@ import { default as g } from "./implement/composition/identity.mjs";
|
|
|
10
10
|
import { default as S } from "./implement/composition/constant.mjs";
|
|
11
11
|
import { default as v } from "./implement/composition/from.mjs";
|
|
12
12
|
import { default as z } from "./implement/composition/tap.mjs";
|
|
13
|
-
import { default as A } from "./implement/composition/
|
|
14
|
-
import { default as q } from "./implement/composition/
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { default as j } from "./implement/control/
|
|
18
|
-
import { default as R } from "./implement/control/
|
|
19
|
-
import { default as V } from "./implement/control/
|
|
20
|
-
import { default as G } from "./implement/control/
|
|
21
|
-
import { default as J } from "./implement/control/
|
|
22
|
-
import { default as Q } from "./implement/
|
|
23
|
-
import { default as Y } from "./implement/array/
|
|
24
|
-
import { default as _ } from "./implement/array/
|
|
25
|
-
import { default as ee } from "./implement/array/
|
|
26
|
-
import { default as ae } from "./implement/array/
|
|
27
|
-
import { default as oe } from "./implement/array/
|
|
28
|
-
import { default as pe } from "./implement/array/
|
|
29
|
-
import { default as le } from "./implement/array/
|
|
30
|
-
import { default as me } from "./implement/array/
|
|
31
|
-
import { default as xe } from "./implement/array/
|
|
32
|
-
import { default as ne } from "./implement/array/
|
|
33
|
-
import { default as he } from "./implement/array/
|
|
34
|
-
import { default as ge } from "./implement/array/
|
|
35
|
-
import { default as Se } from "./implement/array/
|
|
36
|
-
import { default as ve } from "./implement/array/
|
|
37
|
-
import { default as ze } from "./implement/array/
|
|
38
|
-
import { default as Ae } from "./implement/array/
|
|
39
|
-
import { default as qe } from "./implement/array/
|
|
40
|
-
import { default as Le } from "./implement/array/
|
|
41
|
-
import { default as we } from "./implement/array/
|
|
42
|
-
import { default as De } from "./implement/array/
|
|
43
|
-
import { default as Me } from "./implement/array/
|
|
44
|
-
import { default as je } from "./implement/array/
|
|
45
|
-
import { default as Re } from "./implement/array/
|
|
46
|
-
import { default as Ve } from "./implement/array/
|
|
47
|
-
import { default as Ge } from "./implement/array/
|
|
48
|
-
import { default as Je } from "./implement/array/
|
|
49
|
-
import { default as Qe } from "./implement/array/
|
|
50
|
-
import { default as Ye } from "./implement/array/
|
|
51
|
-
import { default as _e } from "./implement/array/
|
|
52
|
-
import { default as et } from "./implement/array/
|
|
53
|
-
import { default as at } from "./implement/array/
|
|
54
|
-
import { default as ot } from "./implement/array/
|
|
55
|
-
import { default as pt } from "./implement/
|
|
56
|
-
import { default as lt } from "./implement/object/
|
|
57
|
-
import { default as mt } from "./implement/object/
|
|
58
|
-
import { default as xt } from "./implement/object/
|
|
59
|
-
import { default as nt } from "./implement/object/
|
|
60
|
-
import { default as ht } from "./implement/object/
|
|
61
|
-
import { default as gt } from "./implement/object/
|
|
62
|
-
import { default as St } from "./implement/object/
|
|
63
|
-
import { default as vt } from "./implement/object/
|
|
64
|
-
import { default as zt } from "./implement/object/
|
|
65
|
-
import { default as At } from "./implement/object/
|
|
66
|
-
import { default as qt } from "./implement/object/
|
|
67
|
-
import { default as Lt } from "./implement/object/
|
|
68
|
-
import { default as wt } from "./implement/object/
|
|
69
|
-
import { default as Dt } from "./implement/object/
|
|
70
|
-
import { default as Mt } from "./implement/object/
|
|
71
|
-
import { default as jt } from "./implement/object/
|
|
72
|
-
import { default as Rt } from "./implement/object/
|
|
73
|
-
import { default as Vt } from "./implement/object/
|
|
74
|
-
import { default as Gt } from "./implement/object/
|
|
75
|
-
import { default as Jt } from "./implement/object/
|
|
76
|
-
import { default as Qt } from "./implement/
|
|
77
|
-
import { default as Yt } from "./implement/equality/
|
|
78
|
-
import { default as _t } from "./implement/equality/
|
|
79
|
-
import { default as ea } from "./implement/equality/
|
|
80
|
-
import { default as aa } from "./implement/equality/
|
|
81
|
-
import { default as oa } from "./implement/equality/
|
|
82
|
-
import { default as pa } from "./implement/equality/
|
|
83
|
-
import { default as la } from "./implement/equality/
|
|
84
|
-
import { default as ma } from "./implement/
|
|
85
|
-
import { default as xa } from "./implement/math/
|
|
86
|
-
import { default as na } from "./implement/math/
|
|
87
|
-
import { default as ha } from "./implement/math/
|
|
88
|
-
import { default as ga } from "./implement/math/
|
|
89
|
-
import { default as Sa } from "./implement/math/
|
|
90
|
-
import { default as va } from "./implement/math/
|
|
91
|
-
import { default as za } from "./implement/
|
|
92
|
-
import { default as Aa } from "./implement/string/
|
|
93
|
-
import { default as qa } from "./implement/string/
|
|
94
|
-
import { default as La } from "./implement/string/
|
|
95
|
-
import { default as wa } from "./implement/string/
|
|
96
|
-
import { default as Da } from "./implement/
|
|
97
|
-
import { default as Ma } from "./implement/async/
|
|
98
|
-
import { default as ja } from "./implement/async/
|
|
99
|
-
import { default as Ra } from "./implement/async/
|
|
100
|
-
import { default as Va } from "./implement/async/
|
|
101
|
-
import { default as Ga } from "./implement/async/
|
|
102
|
-
import { default as Ja } from "./implement/async/
|
|
103
|
-
import { default as Qa } from "./implement/async/
|
|
104
|
-
import { default as Ya } from "./implement/async/
|
|
105
|
-
import { default as _a } from "./implement/async/
|
|
106
|
-
import { default as er } from "./implement/
|
|
107
|
-
import { default as ar } from "./implement/nullable/
|
|
108
|
-
import { default as or } from "./implement/nullable/
|
|
109
|
-
import { default as pr } from "./implement/nullable/
|
|
110
|
-
import { default as lr } from "./implement/nullable/
|
|
111
|
-
import { default as mr } from "./implement/
|
|
112
|
-
import { default as xr } from "./implement/
|
|
113
|
-
import { default as nr } from "./implement/equality/
|
|
114
|
-
import { default as hr } from "./implement/
|
|
115
|
-
import { default as gr } from "./implement/math/
|
|
116
|
-
import { default as Sr } from "./implement/math/
|
|
117
|
-
import { default as vr } from "./implement/math/
|
|
118
|
-
import { default as zr } from "./implement/math/
|
|
119
|
-
import { default as Ar } from "./implement/
|
|
120
|
-
import { default as qr } from "./implement/string/
|
|
121
|
-
import { default as Lr } from "./implement/string/
|
|
122
|
-
import { default as wr } from "./implement/string/
|
|
123
|
-
import { default as Dr } from "./implement/
|
|
124
|
-
import { default as Mr } from "./implement/debug/
|
|
13
|
+
import { default as A } from "./implement/composition/tap0.mjs";
|
|
14
|
+
import { default as q } from "./implement/composition/once.mjs";
|
|
15
|
+
import { default as L } from "./implement/composition/memoize.mjs";
|
|
16
|
+
import { SideEffect as w, SideEffect as C, isSideEffect as D, matchSideEffect as I, runPipeResult as M } from "./implement/composition/sideEffect.mjs";
|
|
17
|
+
import { default as j } from "./implement/control/ifElse.mjs";
|
|
18
|
+
import { default as R } from "./implement/control/when.mjs";
|
|
19
|
+
import { default as V } from "./implement/control/unless.mjs";
|
|
20
|
+
import { default as G } from "./implement/control/cond.mjs";
|
|
21
|
+
import { default as J } from "./implement/control/tryCatch.mjs";
|
|
22
|
+
import { default as Q } from "./implement/control/guard.mjs";
|
|
23
|
+
import { default as Y } from "./implement/array/map.mjs";
|
|
24
|
+
import { default as _ } from "./implement/array/filter.mjs";
|
|
25
|
+
import { default as ee } from "./implement/array/reduce.mjs";
|
|
26
|
+
import { default as ae } from "./implement/array/flatMap.mjs";
|
|
27
|
+
import { default as oe } from "./implement/array/find.mjs";
|
|
28
|
+
import { default as pe } from "./implement/array/some.mjs";
|
|
29
|
+
import { default as le } from "./implement/array/every.mjs";
|
|
30
|
+
import { default as me } from "./implement/array/take.mjs";
|
|
31
|
+
import { default as xe } from "./implement/array/drop.mjs";
|
|
32
|
+
import { default as ne } from "./implement/array/dropWhile.mjs";
|
|
33
|
+
import { default as he } from "./implement/array/chunk.mjs";
|
|
34
|
+
import { default as ge } from "./implement/array/zip.mjs";
|
|
35
|
+
import { default as Se } from "./implement/array/zipWith.mjs";
|
|
36
|
+
import { default as ve } from "./implement/array/unzip.mjs";
|
|
37
|
+
import { default as ze } from "./implement/array/uniq.mjs";
|
|
38
|
+
import { default as Ae } from "./implement/array/uniqBy.mjs";
|
|
39
|
+
import { default as qe } from "./implement/array/sortBy.mjs";
|
|
40
|
+
import { default as Le } from "./implement/array/sort.mjs";
|
|
41
|
+
import { default as we } from "./implement/array/groupBy.mjs";
|
|
42
|
+
import { default as De } from "./implement/array/zipIndex.mjs";
|
|
43
|
+
import { default as Me } from "./implement/array/takeWhile.mjs";
|
|
44
|
+
import { default as je } from "./implement/array/scan.mjs";
|
|
45
|
+
import { default as Re } from "./implement/array/concat.mjs";
|
|
46
|
+
import { default as Ve } from "./implement/array/append.mjs";
|
|
47
|
+
import { default as Ge } from "./implement/array/prepend.mjs";
|
|
48
|
+
import { default as Je } from "./implement/array/flatten.mjs";
|
|
49
|
+
import { default as Qe } from "./implement/array/head.mjs";
|
|
50
|
+
import { default as Ye } from "./implement/array/tail.mjs";
|
|
51
|
+
import { default as _e } from "./implement/array/last.mjs";
|
|
52
|
+
import { default as et } from "./implement/array/init.mjs";
|
|
53
|
+
import { default as at } from "./implement/array/range.mjs";
|
|
54
|
+
import { default as ot } from "./implement/array/partition.mjs";
|
|
55
|
+
import { default as pt } from "./implement/array/flattenDeep.mjs";
|
|
56
|
+
import { default as lt } from "./implement/object/prop.mjs";
|
|
57
|
+
import { default as mt } from "./implement/object/propStrict.mjs";
|
|
58
|
+
import { default as xt } from "./implement/object/propOr.mjs";
|
|
59
|
+
import { default as nt } from "./implement/object/path.mjs";
|
|
60
|
+
import { default as ht } from "./implement/object/pathOr.mjs";
|
|
61
|
+
import { default as gt } from "./implement/object/pick.mjs";
|
|
62
|
+
import { default as St } from "./implement/object/omit.mjs";
|
|
63
|
+
import { default as vt } from "./implement/object/assoc.mjs";
|
|
64
|
+
import { default as zt } from "./implement/object/assocPath.mjs";
|
|
65
|
+
import { default as At } from "./implement/object/dissoc.mjs";
|
|
66
|
+
import { default as qt } from "./implement/object/dissocPath.mjs";
|
|
67
|
+
import { default as Lt } from "./implement/object/merge.mjs";
|
|
68
|
+
import { default as wt } from "./implement/object/mergeDeep.mjs";
|
|
69
|
+
import { default as Dt } from "./implement/object/mergeAll.mjs";
|
|
70
|
+
import { default as Mt } from "./implement/object/keys.mjs";
|
|
71
|
+
import { default as jt } from "./implement/object/values.mjs";
|
|
72
|
+
import { default as Rt } from "./implement/object/entries.mjs";
|
|
73
|
+
import { default as Vt } from "./implement/object/mapValues.mjs";
|
|
74
|
+
import { default as Gt } from "./implement/object/evolve.mjs";
|
|
75
|
+
import { default as Jt } from "./implement/object/has.mjs";
|
|
76
|
+
import { default as Qt } from "./implement/object/hasPath.mjs";
|
|
77
|
+
import { default as Yt } from "./implement/equality/isNil.mjs";
|
|
78
|
+
import { default as _t } from "./implement/equality/isEmpty.mjs";
|
|
79
|
+
import { default as ea } from "./implement/equality/isType.mjs";
|
|
80
|
+
import { default as aa } from "./implement/equality/gt.mjs";
|
|
81
|
+
import { default as oa } from "./implement/equality/gte.mjs";
|
|
82
|
+
import { default as pa } from "./implement/equality/lt.mjs";
|
|
83
|
+
import { default as la } from "./implement/equality/lte.mjs";
|
|
84
|
+
import { default as ma } from "./implement/equality/includes.mjs";
|
|
85
|
+
import { default as xa } from "./implement/math/sum.mjs";
|
|
86
|
+
import { default as na } from "./implement/math/mean.mjs";
|
|
87
|
+
import { default as ha } from "./implement/math/min.mjs";
|
|
88
|
+
import { default as ga } from "./implement/math/max.mjs";
|
|
89
|
+
import { default as Sa } from "./implement/math/round.mjs";
|
|
90
|
+
import { default as va } from "./implement/math/floor.mjs";
|
|
91
|
+
import { default as za } from "./implement/math/ceil.mjs";
|
|
92
|
+
import { default as Aa } from "./implement/string/trim.mjs";
|
|
93
|
+
import { default as qa } from "./implement/string/toUpper.mjs";
|
|
94
|
+
import { default as La } from "./implement/string/toLower.mjs";
|
|
95
|
+
import { default as wa } from "./implement/string/startsWith.mjs";
|
|
96
|
+
import { default as Da } from "./implement/string/endsWith.mjs";
|
|
97
|
+
import { default as Ma } from "./implement/async/pipeAsync.mjs";
|
|
98
|
+
import { default as ja } from "./implement/async/pipeAsyncSideEffect.mjs";
|
|
99
|
+
import { default as Ra } from "./implement/async/pipeAsyncSideEffectStrict.mjs";
|
|
100
|
+
import { default as Va } from "./implement/async/delay.mjs";
|
|
101
|
+
import { default as Ga } from "./implement/async/timeout.mjs";
|
|
102
|
+
import { default as Ja } from "./implement/async/retry.mjs";
|
|
103
|
+
import { default as Qa } from "./implement/async/debounce.mjs";
|
|
104
|
+
import { default as Ya } from "./implement/async/debounceLeading.mjs";
|
|
105
|
+
import { default as _a } from "./implement/async/debounceLeadingTrailing.mjs";
|
|
106
|
+
import { default as er } from "./implement/async/throttle.mjs";
|
|
107
|
+
import { default as ar } from "./implement/nullable/maybe.mjs";
|
|
108
|
+
import { default as or } from "./implement/nullable/mapMaybe.mjs";
|
|
109
|
+
import { default as pr } from "./implement/nullable/getOrElse.mjs";
|
|
110
|
+
import { default as lr } from "./implement/nullable/result.mjs";
|
|
111
|
+
import { default as mr } from "./implement/nullable/fold.mjs";
|
|
112
|
+
import { default as xr } from "./implement/debug/log.mjs";
|
|
113
|
+
import { default as nr } from "./implement/equality/equals.mjs";
|
|
114
|
+
import { default as hr } from "./implement/equality/clamp.mjs";
|
|
115
|
+
import { default as gr } from "./implement/math/add.mjs";
|
|
116
|
+
import { default as Sr } from "./implement/math/sub.mjs";
|
|
117
|
+
import { default as vr } from "./implement/math/mul.mjs";
|
|
118
|
+
import { default as zr } from "./implement/math/div.mjs";
|
|
119
|
+
import { default as Ar } from "./implement/math/randomInt.mjs";
|
|
120
|
+
import { default as qr } from "./implement/string/split.mjs";
|
|
121
|
+
import { default as Lr } from "./implement/string/join.mjs";
|
|
122
|
+
import { default as wr } from "./implement/string/replace.mjs";
|
|
123
|
+
import { default as Dr } from "./implement/string/match.mjs";
|
|
124
|
+
import { default as Mr } from "./implement/debug/assert.mjs";
|
|
125
|
+
import { default as jr } from "./implement/debug/invariant.mjs";
|
|
125
126
|
export {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
127
|
+
w as SideEffect,
|
|
128
|
+
C as SideEffectClass,
|
|
129
|
+
gr as add,
|
|
130
|
+
Ve as append,
|
|
131
|
+
Mr as assert,
|
|
132
|
+
vt as assoc,
|
|
133
|
+
zt as assocPath,
|
|
134
|
+
za as ceil,
|
|
135
|
+
he as chunk,
|
|
136
|
+
hr as clamp,
|
|
136
137
|
h as complement,
|
|
137
138
|
l as compose,
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
Re as concat,
|
|
140
|
+
G as cond,
|
|
140
141
|
S as constant,
|
|
141
142
|
m as curry,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
143
|
+
Qa as debounce,
|
|
144
|
+
Ya as debounceLeading,
|
|
145
|
+
_a as debounceLeadingTrailing,
|
|
146
|
+
Va as delay,
|
|
147
|
+
At as dissoc,
|
|
148
|
+
qt as dissocPath,
|
|
149
|
+
zr as div,
|
|
150
|
+
xe as drop,
|
|
151
|
+
ne as dropWhile,
|
|
152
|
+
Da as endsWith,
|
|
153
|
+
Rt as entries,
|
|
154
|
+
nr as equals,
|
|
155
|
+
le as every,
|
|
156
|
+
Gt as evolve,
|
|
157
|
+
_ as filter,
|
|
158
|
+
oe as find,
|
|
159
|
+
ae as flatMap,
|
|
160
|
+
Je as flatten,
|
|
161
|
+
pt as flattenDeep,
|
|
161
162
|
n as flip,
|
|
162
|
-
|
|
163
|
-
|
|
163
|
+
va as floor,
|
|
164
|
+
mr as fold,
|
|
164
165
|
v as from,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
166
|
+
pr as getOrElse,
|
|
167
|
+
we as groupBy,
|
|
168
|
+
aa as gt,
|
|
169
|
+
oa as gte,
|
|
170
|
+
Q as guard,
|
|
171
|
+
Jt as has,
|
|
172
|
+
Qt as hasPath,
|
|
173
|
+
Qe as head,
|
|
173
174
|
g as identity,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
175
|
+
j as ifElse,
|
|
176
|
+
ma as includes,
|
|
177
|
+
et as init,
|
|
178
|
+
jr as invariant,
|
|
179
|
+
_t as isEmpty,
|
|
180
|
+
Yt as isNil,
|
|
181
|
+
D as isSideEffect,
|
|
182
|
+
ea as isType,
|
|
183
|
+
Lr as join,
|
|
184
|
+
Mt as keys,
|
|
185
|
+
_e as last,
|
|
186
|
+
xr as log,
|
|
187
|
+
pa as lt,
|
|
188
|
+
la as lte,
|
|
189
|
+
Y as map,
|
|
190
|
+
or as mapMaybe,
|
|
191
|
+
Vt as mapValues,
|
|
192
|
+
Dr as match,
|
|
193
|
+
I as matchSideEffect,
|
|
194
|
+
ga as max,
|
|
195
|
+
ar as maybe,
|
|
196
|
+
na as mean,
|
|
197
|
+
L as memoize,
|
|
198
|
+
Lt as merge,
|
|
199
|
+
Dt as mergeAll,
|
|
200
|
+
wt as mergeDeep,
|
|
201
|
+
ha as min,
|
|
202
|
+
vr as mul,
|
|
203
|
+
St as omit,
|
|
204
|
+
q as once,
|
|
204
205
|
x as partial,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
ot as partition,
|
|
207
|
+
nt as path,
|
|
208
|
+
ht as pathOr,
|
|
209
|
+
gt as pick,
|
|
209
210
|
a as pipe,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
Ma as pipeAsync,
|
|
212
|
+
ja as pipeAsyncSideEffect,
|
|
213
|
+
Ra as pipeAsyncSideEffectStrict,
|
|
213
214
|
o as pipeSideEffect,
|
|
214
215
|
p as pipeSideEffectStrict,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
216
|
+
Ge as prepend,
|
|
217
|
+
lt as prop,
|
|
218
|
+
xt as propOr,
|
|
219
|
+
mt as propStrict,
|
|
220
|
+
Ar as randomInt,
|
|
221
|
+
at as range,
|
|
222
|
+
ee as reduce,
|
|
223
|
+
wr as replace,
|
|
224
|
+
lr as result,
|
|
225
|
+
Ja as retry,
|
|
226
|
+
Sa as round,
|
|
227
|
+
M as runPipeResult,
|
|
228
|
+
je as scan,
|
|
229
|
+
pe as some,
|
|
230
|
+
Le as sort,
|
|
231
|
+
qe as sortBy,
|
|
232
|
+
qr as split,
|
|
233
|
+
wa as startsWith,
|
|
234
|
+
Sr as sub,
|
|
235
|
+
xa as sum,
|
|
236
|
+
Ye as tail,
|
|
237
|
+
me as take,
|
|
238
|
+
Me as takeWhile,
|
|
238
239
|
z as tap,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
ze as
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
240
|
+
A as tap0,
|
|
241
|
+
er as throttle,
|
|
242
|
+
Ga as timeout,
|
|
243
|
+
La as toLower,
|
|
244
|
+
qa as toUpper,
|
|
245
|
+
Aa as trim,
|
|
246
|
+
J as tryCatch,
|
|
247
|
+
ze as uniq,
|
|
248
|
+
Ae as uniqBy,
|
|
249
|
+
V as unless,
|
|
250
|
+
ve as unzip,
|
|
251
|
+
jt as values,
|
|
252
|
+
R as when,
|
|
253
|
+
ge as zip,
|
|
254
|
+
De as zipIndex,
|
|
255
|
+
Se as zipWith
|
|
254
256
|
};
|
|
255
257
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -7,7 +7,7 @@ metadata:
|
|
|
7
7
|
|
|
8
8
|
# fp-pack AI Agent Skills
|
|
9
9
|
|
|
10
|
-
Document Version: 0.
|
|
10
|
+
Document Version: 0.7.0
|
|
11
11
|
|
|
12
12
|
This document provides guidelines for AI coding assistants when working in projects that use fp-pack. Follow these instructions to write clean, declarative, functional code using fp-pack's utilities.
|
|
13
13
|
|
|
@@ -221,6 +221,7 @@ const result = Array.from({ length: 1000000 }, (_, i) => i + 1)
|
|
|
221
221
|
- `constant` - Always return the same value
|
|
222
222
|
- `from` - Ignore input and return a fixed value
|
|
223
223
|
- `tap` - Execute side effect and return original value
|
|
224
|
+
- `tap0` - Execute side effect without input
|
|
224
225
|
- `once` - Execute function only once
|
|
225
226
|
- `memoize` - Cache function results
|
|
226
227
|
- `SideEffect` - Side effect container
|
package/dist/skills/fp-pack.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# fp-pack AI Agent Skills
|
|
2
2
|
|
|
3
|
-
Document Version: 0.
|
|
3
|
+
Document Version: 0.7.0
|
|
4
4
|
|
|
5
5
|
This document provides guidelines for AI coding assistants when working in projects that use fp-pack. Follow these instructions to write clean, declarative, functional code using fp-pack's utilities.
|
|
6
6
|
|
|
@@ -214,6 +214,7 @@ const result = Array.from({ length: 1000000 }, (_, i) => i + 1)
|
|
|
214
214
|
- `constant` - Always return the same value
|
|
215
215
|
- `from` - Ignore input and return a fixed value
|
|
216
216
|
- `tap` - Execute side effect and return original value
|
|
217
|
+
- `tap0` - Execute side effect without input
|
|
217
218
|
- `once` - Execute function only once
|
|
218
219
|
- `memoize` - Cache function results
|
|
219
220
|
- `SideEffect` - Side effect container
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import type { FromFn } from '../composition/from';
|
|
|
2
2
|
|
|
3
3
|
/** pipeAsync - 비동기 함수 합성 */
|
|
4
4
|
type AsyncOrSync<A, R> = (a: A) => R | Promise<R>;
|
|
5
|
+
type ZeroFn<R> = () => R | Promise<R>;
|
|
5
6
|
type PipeInput<Fns extends AsyncOrSync<any, any>[]> = Fns extends [AsyncOrSync<infer A, any>, ...AsyncOrSync<any, any>[]]
|
|
6
7
|
? A
|
|
7
8
|
: never;
|
|
@@ -17,6 +18,76 @@ type PipeAsyncFrom<Fns extends [FromFn<any>, ...AsyncOrSync<any, any>[]]> = (
|
|
|
17
18
|
input?: PipeInput<Fns>
|
|
18
19
|
) => Promise<PipeOutput<Fns>>;
|
|
19
20
|
|
|
21
|
+
function pipeAsync<R>(ab: ZeroFn<R>): () => Promise<Awaited<R>>;
|
|
22
|
+
function pipeAsync<B, R>(ab: ZeroFn<B>, bc: AsyncOrSync<Awaited<B>, R>): () => Promise<Awaited<R>>;
|
|
23
|
+
function pipeAsync<B, C, R>(
|
|
24
|
+
ab: ZeroFn<B>,
|
|
25
|
+
bc: AsyncOrSync<Awaited<B>, C>,
|
|
26
|
+
cd: AsyncOrSync<Awaited<C>, R>
|
|
27
|
+
): () => Promise<Awaited<R>>;
|
|
28
|
+
function pipeAsync<B, C, D, R>(
|
|
29
|
+
ab: ZeroFn<B>,
|
|
30
|
+
bc: AsyncOrSync<Awaited<B>, C>,
|
|
31
|
+
cd: AsyncOrSync<Awaited<C>, D>,
|
|
32
|
+
de: AsyncOrSync<Awaited<D>, R>
|
|
33
|
+
): () => Promise<Awaited<R>>;
|
|
34
|
+
function pipeAsync<B, C, D, E, R>(
|
|
35
|
+
ab: ZeroFn<B>,
|
|
36
|
+
bc: AsyncOrSync<Awaited<B>, C>,
|
|
37
|
+
cd: AsyncOrSync<Awaited<C>, D>,
|
|
38
|
+
de: AsyncOrSync<Awaited<D>, E>,
|
|
39
|
+
ef: AsyncOrSync<Awaited<E>, R>
|
|
40
|
+
): () => Promise<Awaited<R>>;
|
|
41
|
+
function pipeAsync<B, C, D, E, F, R>(
|
|
42
|
+
ab: ZeroFn<B>,
|
|
43
|
+
bc: AsyncOrSync<Awaited<B>, C>,
|
|
44
|
+
cd: AsyncOrSync<Awaited<C>, D>,
|
|
45
|
+
de: AsyncOrSync<Awaited<D>, E>,
|
|
46
|
+
ef: AsyncOrSync<Awaited<E>, F>,
|
|
47
|
+
fg: AsyncOrSync<Awaited<F>, R>
|
|
48
|
+
): () => Promise<Awaited<R>>;
|
|
49
|
+
function pipeAsync<B, C, D, E, F, G, R>(
|
|
50
|
+
ab: ZeroFn<B>,
|
|
51
|
+
bc: AsyncOrSync<Awaited<B>, C>,
|
|
52
|
+
cd: AsyncOrSync<Awaited<C>, D>,
|
|
53
|
+
de: AsyncOrSync<Awaited<D>, E>,
|
|
54
|
+
ef: AsyncOrSync<Awaited<E>, F>,
|
|
55
|
+
fg: AsyncOrSync<Awaited<F>, G>,
|
|
56
|
+
gh: AsyncOrSync<Awaited<G>, R>
|
|
57
|
+
): () => Promise<Awaited<R>>;
|
|
58
|
+
function pipeAsync<B, C, D, E, F, G, H, R>(
|
|
59
|
+
ab: ZeroFn<B>,
|
|
60
|
+
bc: AsyncOrSync<Awaited<B>, C>,
|
|
61
|
+
cd: AsyncOrSync<Awaited<C>, D>,
|
|
62
|
+
de: AsyncOrSync<Awaited<D>, E>,
|
|
63
|
+
ef: AsyncOrSync<Awaited<E>, F>,
|
|
64
|
+
fg: AsyncOrSync<Awaited<F>, G>,
|
|
65
|
+
gh: AsyncOrSync<Awaited<G>, H>,
|
|
66
|
+
hi: AsyncOrSync<Awaited<H>, R>
|
|
67
|
+
): () => Promise<Awaited<R>>;
|
|
68
|
+
function pipeAsync<B, C, D, E, F, G, H, I, R>(
|
|
69
|
+
ab: ZeroFn<B>,
|
|
70
|
+
bc: AsyncOrSync<Awaited<B>, C>,
|
|
71
|
+
cd: AsyncOrSync<Awaited<C>, D>,
|
|
72
|
+
de: AsyncOrSync<Awaited<D>, E>,
|
|
73
|
+
ef: AsyncOrSync<Awaited<E>, F>,
|
|
74
|
+
fg: AsyncOrSync<Awaited<F>, G>,
|
|
75
|
+
gh: AsyncOrSync<Awaited<G>, H>,
|
|
76
|
+
hi: AsyncOrSync<Awaited<H>, I>,
|
|
77
|
+
ij: AsyncOrSync<Awaited<I>, R>
|
|
78
|
+
): () => Promise<Awaited<R>>;
|
|
79
|
+
function pipeAsync<B, C, D, E, F, G, H, I, J, R>(
|
|
80
|
+
ab: ZeroFn<B>,
|
|
81
|
+
bc: AsyncOrSync<Awaited<B>, C>,
|
|
82
|
+
cd: AsyncOrSync<Awaited<C>, D>,
|
|
83
|
+
de: AsyncOrSync<Awaited<D>, E>,
|
|
84
|
+
ef: AsyncOrSync<Awaited<E>, F>,
|
|
85
|
+
fg: AsyncOrSync<Awaited<F>, G>,
|
|
86
|
+
gh: AsyncOrSync<Awaited<G>, H>,
|
|
87
|
+
hi: AsyncOrSync<Awaited<H>, I>,
|
|
88
|
+
ij: AsyncOrSync<Awaited<I>, J>,
|
|
89
|
+
jk: AsyncOrSync<Awaited<J>, R>
|
|
90
|
+
): () => Promise<Awaited<R>>;
|
|
20
91
|
function pipeAsync<Fns extends [FromFn<any>, ...AsyncOrSync<any, any>[]]>(...funcs: Fns): PipeAsyncFrom<Fns>;
|
|
21
92
|
function pipeAsync<A, R>(ab: AsyncOrSync<A, R>): (a: A) => Promise<Awaited<R>>;
|
|
22
93
|
function pipeAsync<A, B, R>(ab: AsyncOrSync<A, B>, bc: AsyncOrSync<Awaited<B>, R>): (a: A) => Promise<Awaited<R>>;
|