You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+12-12
Original file line number
Diff line number
Diff line change
@@ -86,25 +86,25 @@ When you import this library, you obtain the freedom that comes from having thos
86
86
87
87
# Introduction
88
88
89
-
rubico is a library for async-enabled functional programming in JavaScript. The library methods support a simple and composable functional style in asynchronous environments.
89
+
rubico is a library for async-enabled functional programming in JavaScript. The library operators support a simple and composable functional style in asynchronous environments.
90
90
91
91
```javascript
92
92
const {
93
93
// compose functions
94
-
pipe, compose,
95
-
96
-
// handle effects
97
-
tap, forEach,
94
+
pipe, compose, tap,
98
95
99
96
// control flow
100
97
switchCase,
101
98
102
99
// handle errors
103
100
tryCatch,
104
101
105
-
//handle objects
102
+
//compose data
106
103
all, assign, get, set, pick, omit,
107
104
105
+
// iterate
106
+
forEach,
107
+
108
108
// transform data
109
109
map, filter, reduce, transform, flatMap,
110
110
@@ -119,7 +119,7 @@ const {
119
119
} = rubico
120
120
```
121
121
122
-
With async-enabled, or [a]synchronous, functional programming, functions provided to the rubico methods may be asynchronous and return a Promise. Any promises in argument position are also resolved before continuing with the operation.
122
+
With async-enabled, or [a]synchronous, functional programming, functions provided to the rubico operators may be asynchronous and return a Promise. Any promises in argument position are also resolved before continuing with the operation.
123
123
124
124
```javascript [playground]
125
125
consthelloPromise=Promise.resolve('hello')
@@ -133,7 +133,7 @@ pipe(helloPromise, [ // helloPromise is resolved for 'hello'
133
133
])
134
134
```
135
135
136
-
Most methods support both an eager and a lazy API. The eager API takes all required arguments and executes at once, while its lazy API takes only the non-data arguments and executes lazily, returning a function that expects the data arguments. This dual API supports a natural and composable code style.
136
+
All rubico operators support both an eager and a lazy API. The eager API takes all required arguments and executes at once, while its lazy API takes only the non-data arguments and executes lazily, returning a function that expects the data arguments. This dual API supports a natural and composable code style.
The rubico methods are versatile and act on a wide range of vanilla JavaScript types to create declarative, extensible, and async-enabled function compositions. The same operator `map` can act on an array and also a `Map` data structure.
153
+
The rubico operators are versatile and act on a wide range of vanilla JavaScript types to create declarative, extensible, and async-enabled function compositions. The same operator `map` can act on an array and also a `Map` data structure.
154
154
155
155
```javascript [playground]
156
156
const { pipe, tap, map, filter } = rubico
@@ -203,7 +203,7 @@ pipe(todoIDs, [
203
203
])
204
204
```
205
205
206
-
rubico offers transducers in its `Transducer` module. You can consume these transducers with the `transform` and `compose`methods. You should use `compose` over `pipe` to chain a left-to-right composition of transducers.
206
+
rubico offers transducers in its `Transducer` module. You can consume these transducers with the `transform` and `compose`operators. You should use `compose` over `pipe` to chain a left-to-right composition of transducers.
207
207
208
208
```javascript [playground]
209
209
constisOdd=number=> number %2==1
@@ -227,12 +227,12 @@ pipe(generateNumbers(), [
227
227
])
228
228
```
229
229
230
-
For advanced asynchronous use cases, some of the methods have property functions that have different asynchronous behavior, e.g.
230
+
For advanced asynchronous use cases, some of the operators have property functions that have different asynchronous behavior, e.g.
231
231
*`map` - apply a mapper function concurrently
232
232
*`map.pool` - apply a mapper function concurrently with a concurrency limit
233
233
*`map.series` - apply a mapper function serially
234
234
235
-
For more functions beyond the core methods, please visit `rubico/x`. You can find the full documentation at [rubico.land/docs](https://rubico.land/docs).
235
+
For more functions beyond the core operators, please visit `rubico/x`. You can find the full documentation at [rubico.land/docs](https://rubico.land/docs).
236
236
237
237
# Benchmarks
238
238
Please find the published benchmark output inside the [benchmark-output](https://github.com/a-synchronous/rubico/tree/master/benchmark-output) folder. You can run the benchmarks on your own system with the following command:
0 commit comments