rambda 10.2.0 → 10.3.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/CHANGELOG.md +125 -10
- package/README.md +892 -259
- package/dist/rambda.cjs +106 -41
- package/dist/rambda.js +102 -42
- package/dist/rambda.umd.js +106 -41
- package/index.d.cts +62 -44
- package/index.d.ts +62 -44
- package/package.json +8 -8
- package/rambda.js +5 -0
- package/src/duplicateBy.js +9 -0
- package/src/filterAsync.js +14 -0
- package/src/indexBy.js +14 -0
- package/src/mapAsync.js +2 -2
- package/src/mapPropObject.js +10 -0
- package/src/replaceAll.js +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
10.3.0
|
|
2
|
+
|
|
3
|
+
- Add `R.mapPropObject`
|
|
4
|
+
|
|
5
|
+
- Add `R.duplicateBy`
|
|
6
|
+
|
|
7
|
+
- Add `R.filterAsync`
|
|
8
|
+
|
|
9
|
+
- Add `R.indexBy`
|
|
10
|
+
|
|
11
|
+
- Restore `R.replaceAll`
|
|
12
|
+
|
|
13
|
+
- Remove option for `R.mapAsync` to be called outside of `R.pipeAsync`. This is done for consistency as all other methods follow this rule, i.e. they are all curried.
|
|
14
|
+
|
|
15
|
+
- Fix `R.pluck` to work without `R.pipe`
|
|
16
|
+
|
|
17
|
+
10.2.0
|
|
18
|
+
|
|
19
|
+
Add `R.modifyPath`
|
|
20
|
+
|
|
1
21
|
10.1.0
|
|
2
22
|
|
|
3
23
|
- Add `R.assertType` and `R.convertToType` methods
|
|
@@ -22,7 +42,7 @@ This is major revamp of `Rambda` library:
|
|
|
22
42
|
|
|
23
43
|
- Confusing methods are removed. For example, `R.cond` and `R.ifElse` are removed as their usage inside `R.piped` makes the whole chain less readable. Such logic should be part of your codebase, not part of external library.
|
|
24
44
|
|
|
25
|
-
- All methods that expect more than 1 input, will have to be called with `R.methodName(input1)(input2)` or `R.methodName(input1, input2)(input3)`. This is to make TypeScript definitions easier to maintain.
|
|
45
|
+
- All methods that expect more than 1 input, will have to be called with `R.methodName(input1)(input2)` or `R.methodName(input1, input2)(input3)`. This is to make TypeScript definitions easier to maintain.
|
|
26
46
|
|
|
27
47
|
- Optimize many methods to better work in TypeScript context with `R.pipe`. The focus was passing objects through the `R.pipe` chain.
|
|
28
48
|
|
|
@@ -34,83 +54,149 @@ This is major revamp of `Rambda` library:
|
|
|
34
54
|
- Remove following methods:
|
|
35
55
|
|
|
36
56
|
-- Lenses - `R.lens`, `R.lensProp`, `R.lensPath`, `R.view`, `R.set`, `R.over`
|
|
57
|
+
|
|
37
58
|
-- T, F
|
|
59
|
+
|
|
38
60
|
-- add
|
|
61
|
+
|
|
39
62
|
-- addIndex, addIndexRight
|
|
63
|
+
|
|
40
64
|
-- always
|
|
65
|
+
|
|
41
66
|
-- ap
|
|
67
|
+
|
|
42
68
|
-- applySpec
|
|
69
|
+
|
|
43
70
|
-- applyTo
|
|
71
|
+
|
|
44
72
|
-- assoc, assocPath, dissoc, dissocPath
|
|
73
|
+
|
|
45
74
|
-- binary
|
|
75
|
+
|
|
46
76
|
-- bind
|
|
77
|
+
|
|
47
78
|
-- call
|
|
79
|
+
|
|
48
80
|
-- collectBy
|
|
81
|
+
|
|
49
82
|
-- compose
|
|
83
|
+
|
|
50
84
|
-- composeWith
|
|
85
|
+
|
|
51
86
|
-- cond
|
|
87
|
+
|
|
52
88
|
-- converge
|
|
89
|
+
|
|
53
90
|
-- curry
|
|
91
|
+
|
|
54
92
|
-- difference, differenceWith
|
|
93
|
+
|
|
55
94
|
-- divide, multiply, subtract
|
|
95
|
+
|
|
56
96
|
-- endsWith/startsWith
|
|
97
|
+
|
|
57
98
|
-- flip
|
|
99
|
+
|
|
58
100
|
-- forEachObjIndexed
|
|
101
|
+
|
|
59
102
|
-- fromPairs
|
|
103
|
+
|
|
60
104
|
-- gte, lte, lt, gt
|
|
105
|
+
|
|
61
106
|
-- identical
|
|
107
|
+
|
|
62
108
|
-- ifElse
|
|
109
|
+
|
|
63
110
|
-- insert
|
|
111
|
+
|
|
64
112
|
-- juxt
|
|
113
|
+
|
|
65
114
|
-- length
|
|
115
|
+
|
|
66
116
|
-- mapObjIndexed
|
|
117
|
+
|
|
67
118
|
-- mergeAll, mergeLeft, mergeDeepLeft, mergeDeepRight
|
|
119
|
+
|
|
68
120
|
-- move
|
|
121
|
+
|
|
69
122
|
-- partitionIndexed
|
|
123
|
+
|
|
70
124
|
-- pickAll
|
|
125
|
+
|
|
71
126
|
-- pickBy
|
|
127
|
+
|
|
72
128
|
-- repeat
|
|
129
|
+
|
|
73
130
|
-- splitWhen
|
|
131
|
+
|
|
74
132
|
-- toLower/toUpper
|
|
133
|
+
|
|
75
134
|
-- unapply
|
|
135
|
+
|
|
76
136
|
-- unnest
|
|
137
|
+
|
|
77
138
|
-- update
|
|
139
|
+
|
|
78
140
|
-- without
|
|
79
141
|
|
|
80
142
|
- Add following methods:
|
|
81
143
|
|
|
82
144
|
-- R.pipeAsync
|
|
145
|
+
|
|
83
146
|
-- R.addProp
|
|
147
|
+
|
|
84
148
|
-- R.createObjectFromKeys
|
|
149
|
+
|
|
85
150
|
-- R.mapAsync
|
|
151
|
+
|
|
86
152
|
-- R.mapParallelAsync
|
|
153
|
+
|
|
87
154
|
-- R.ascend/R.descend
|
|
155
|
+
|
|
88
156
|
-- R.shuffle
|
|
157
|
+
|
|
89
158
|
-- R.permutations
|
|
159
|
+
|
|
90
160
|
-- R.compact
|
|
161
|
+
|
|
91
162
|
-- R.rejectObject
|
|
163
|
+
|
|
92
164
|
-- R.findNth
|
|
165
|
+
|
|
93
166
|
-- R.combinations
|
|
167
|
+
|
|
94
168
|
-- R.sortByPath
|
|
169
|
+
|
|
95
170
|
-- R.sortByPathDescending
|
|
171
|
+
|
|
96
172
|
-- R.sortByDescending
|
|
173
|
+
|
|
97
174
|
-- R.flattenObject
|
|
175
|
+
|
|
98
176
|
-- R.addPropToObjects
|
|
99
177
|
|
|
100
178
|
- Rename following methods:
|
|
101
179
|
|
|
102
180
|
-- modifyItemAtIndex -> adjust
|
|
103
|
-
|
|
181
|
+
|
|
182
|
+
-- checkObjectWithSpec -> where
|
|
183
|
+
|
|
104
184
|
-- objectIncludes -> whereEq
|
|
185
|
+
|
|
105
186
|
-- modify -> modifyProp
|
|
187
|
+
|
|
106
188
|
-- chain -> flatMap
|
|
189
|
+
|
|
107
190
|
-- mapObjIndexed -> mapObject
|
|
108
191
|
|
|
109
192
|
_ Regarding using object as input with TypeScript in methods such as `R.map/filter` - this feature is no longer supported in TypeScript as it has multiple issues when using inside pipes. In JS, it still works as before. Following methods are affected:
|
|
110
193
|
|
|
111
194
|
-- R.map
|
|
195
|
+
|
|
112
196
|
-- R.mapIndexed
|
|
197
|
+
|
|
113
198
|
-- R.filter
|
|
199
|
+
|
|
114
200
|
-- R.reject
|
|
115
201
|
|
|
116
202
|
- Regarding using string as path input in `R.omit`, `R.pick` and `R.path` with TypeScript - now it require explicit definition of expected return type.
|
|
@@ -139,36 +225,63 @@ _ Regarding using object as input with TypeScript in methods such as `R.map/filt
|
|
|
139
225
|
- Sync with typing of `@types/ramda`:
|
|
140
226
|
|
|
141
227
|
-- allPass
|
|
228
|
+
|
|
142
229
|
-- anyPass
|
|
230
|
+
|
|
143
231
|
-- append
|
|
232
|
+
|
|
144
233
|
-- both
|
|
234
|
+
|
|
145
235
|
-- countBy
|
|
236
|
+
|
|
146
237
|
-- drop
|
|
238
|
+
|
|
147
239
|
-- dropLast
|
|
240
|
+
|
|
148
241
|
-- dropRepeatsBy
|
|
242
|
+
|
|
149
243
|
-- either
|
|
244
|
+
|
|
150
245
|
-- filter
|
|
246
|
+
|
|
151
247
|
-- forEach
|
|
248
|
+
|
|
152
249
|
-- keys
|
|
250
|
+
|
|
153
251
|
-- map
|
|
252
|
+
|
|
154
253
|
-- mergeAll
|
|
254
|
+
|
|
155
255
|
-- modify
|
|
256
|
+
|
|
156
257
|
-- modifyPath
|
|
258
|
+
|
|
157
259
|
-- omit
|
|
260
|
+
|
|
158
261
|
-- partition
|
|
262
|
+
|
|
159
263
|
-- pluck
|
|
264
|
+
|
|
160
265
|
-- prepend
|
|
266
|
+
|
|
161
267
|
-- propEq
|
|
268
|
+
|
|
162
269
|
-- where
|
|
270
|
+
|
|
163
271
|
-- whereAny
|
|
164
272
|
|
|
165
273
|
- Sync with typing of `remeda`:
|
|
166
274
|
|
|
167
275
|
-- filter
|
|
276
|
+
|
|
168
277
|
-- reject
|
|
278
|
+
|
|
169
279
|
-- map
|
|
280
|
+
|
|
170
281
|
-- mapObject
|
|
282
|
+
|
|
171
283
|
-- toPairs
|
|
284
|
+
|
|
172
285
|
-- partition
|
|
173
286
|
|
|
174
287
|
- Publish to JSR registry - https://jsr.io/@rambda/rambda
|
|
@@ -178,7 +291,9 @@ _ Regarding using object as input with TypeScript in methods such as `R.map/filt
|
|
|
178
291
|
- Improve TypeScript definitions of:
|
|
179
292
|
|
|
180
293
|
-- objOf
|
|
294
|
+
|
|
181
295
|
-- pluck
|
|
296
|
+
|
|
182
297
|
-- mergeWith
|
|
183
298
|
|
|
184
299
|
- Change `Jest` with `Vitest`.
|
|
@@ -224,7 +339,7 @@ const result = piped(
|
|
|
224
339
|
|
|
225
340
|
- Add `R.isNotEmpty` as it is new method in `Ramda`
|
|
226
341
|
|
|
227
|
-
- Fix `R.head`/`R.last` TS definition - It returns `undefined` if array has length of 0. Before
|
|
342
|
+
- Fix `R.head`/`R.last` TS definition - It returns `undefined` if array has length of 0. Before
|
|
228
343
|
|
|
229
344
|
9.2.1
|
|
230
345
|
|
|
@@ -234,7 +349,7 @@ const result = piped(
|
|
|
234
349
|
|
|
235
350
|
- `R.once` TS type definition miss to context argument and its type - [Issue #728](https://github.com/selfrefactor/rambda/issues/728)
|
|
236
351
|
|
|
237
|
-
- Fix implementation of `R.unless` function - https://github.com/selfrefactor/rambda/pull/726
|
|
352
|
+
- Fix implementation of `R.unless` function - https://github.com/selfrefactor/rambda/pull/726
|
|
238
353
|
|
|
239
354
|
9.1.1
|
|
240
355
|
|
|
@@ -310,7 +425,7 @@ Breaking change in TS definitions of `lenses` as now they are synced to `Ramda`
|
|
|
310
425
|
|
|
311
426
|
- Fix cannot compare errors in `Deno` with `R.equals` - [Issue #704](https://github.com/selfrefactor/rambda/issues/704).
|
|
312
427
|
|
|
313
|
-
- Fix cannot compare `BigInt` with `R.equals`
|
|
428
|
+
- Fix cannot compare `BigInt` with `R.equals`
|
|
314
429
|
|
|
315
430
|
8.3.0
|
|
316
431
|
|
|
@@ -395,7 +510,7 @@ Add the following methods:
|
|
|
395
510
|
|
|
396
511
|
7.2.1
|
|
397
512
|
|
|
398
|
-
- Remove bad typings of `R.propIs` which caused the library to cannot be build with TypeScript.
|
|
513
|
+
- Remove bad typings of `R.propIs` which caused the library to cannot be build with TypeScript.
|
|
399
514
|
|
|
400
515
|
- Drop support for `Wallaby` as per [https://github.com/wallabyjs/public/issues/3037](https://github.com/wallabyjs/public/issues/3037)
|
|
401
516
|
|
|
@@ -489,11 +604,11 @@ There are several other changes in `@types/ramda` as stated in [this comment](ht
|
|
|
489
604
|
|
|
490
605
|
-- R.toUpper
|
|
491
606
|
|
|
492
|
-
- One more reason for the breaking change is changing of export declarations in `package.json` based on [this blog post](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing) and [this merged Ramda's PR](https://github.com/ramda/ramda/pull/2999). This also led to renaming of `babel.config.js` to `babel.config.cjs`.
|
|
607
|
+
- One more reason for the breaking change is changing of export declarations in `package.json` based on [this blog post](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing) and [this merged Ramda's PR](https://github.com/ramda/ramda/pull/2999). This also led to renaming of `babel.config.js` to `babel.config.cjs`.
|
|
493
608
|
|
|
494
609
|
- Add `R.apply`, `R.bind` and `R.unapply`
|
|
495
610
|
|
|
496
|
-
- `R.startsWith/R.endsWith` now support lists as inputs. This way, it matches current Ramda behavior.
|
|
611
|
+
- `R.startsWith/R.endsWith` now support lists as inputs. This way, it matches current Ramda behavior.
|
|
497
612
|
|
|
498
613
|
- Remove unused typing for `R.chain`.
|
|
499
614
|
|
|
@@ -521,7 +636,7 @@ There are several other changes in `@types/ramda` as stated in [this comment](ht
|
|
|
521
636
|
|
|
522
637
|
- Incorrect benchmarks for `R.pipe/R.compose` - [Issue #608](https://github.com/selfrefactor/rambda/issues/608)
|
|
523
638
|
|
|
524
|
-
- Fix `R.last/R.head` typings - [Issue #609](https://github.com/selfrefactor/rambda/issues/609)
|
|
639
|
+
- Fix `R.last/R.head` typings - [Issue #609](https://github.com/selfrefactor/rambda/issues/609)
|
|
525
640
|
|
|
526
641
|
6.9.0
|
|
527
642
|
|
|
@@ -536,7 +651,7 @@ Fixing `R.uniq` was done by improving `R.indexOf` which has performance implicat
|
|
|
536
651
|
- R.symmetricDifference
|
|
537
652
|
- R.union
|
|
538
653
|
|
|
539
|
-
- R.without no longer support the following case - `without('0:1', ['0', '0:1']) // => ['0']`. Now it throws as the first argument should be a list, not a string. Ramda, on the other hand, returns an empty list - https://github.com/ramda/ramda/issues/3086.
|
|
654
|
+
- R.without no longer support the following case - `without('0:1', ['0', '0:1']) // => ['0']`. Now it throws as the first argument should be a list, not a string. Ramda, on the other hand, returns an empty list - https://github.com/ramda/ramda/issues/3086.
|
|
540
655
|
|
|
541
656
|
6.8.3
|
|
542
657
|
|