Skip to content

Commit 1d44c58

Browse files
authored
Proof-Reading
1 parent 20a43a4 commit 1d44c58

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# orb-array
2-
*orb-array* aims to simplify common array operations that use functional programming constructs. The usage of map, reduce, filter, fill etc. APIs is often verbose. Our goal is to make their usage *less-verbose*
2+
The usage of map, reduce, filter, fill etc. APIs is often verbose. *orb-array* aims to make it *less-verbose*.
33

44
## APIs
55
### split
6-
It splits an array into specified number of pieces. When the number of pieces is larger than the input size, it creates empty pieces. It always returns the specified number of pieces. Following are some examples:
6+
It splits an array into the specified number of pieces. When the number of pieces is larger than the input size, it creates empty pieces. It always returns the specified number of pieces. Some examples:
77
```js
8-
// Default is splitting from the middle.
8+
// Midway split is the default behavior.
99
const items = [1, 2, 3, 4, 5]
1010
const pieces = split(items)
1111
// Output: [[1, 2, 3], [4, 5]]
@@ -32,7 +32,7 @@ const items = fill(5, v => v*2) // v is an item index
3232
```
3333

3434
### zip
35-
It zips a bunch of arrays together. If the arrays vary in size, the output size is equal to the shortest array.
35+
It zips arrays together. When the array sizes vary, the output size is equal to the shortest array.
3636
```js
3737
const items = range(5)
3838
const values = range(10)
@@ -42,7 +42,7 @@ const zipped = zip(items, values)
4242
### reduce
4343
*reduce* support several operations.
4444

45-
**reduce.o** reduces an array to an object. It supports customizations using key and value functions. In the absence of customizations, key and value are the input array items.
45+
**reduce.o** reduces an array to an object. It supports customizations using the key and the value functions. Without customizations, key and value are the input array items.
4646
```js
4747
const items = range(5)
4848
const o = reduce.o(items)
@@ -54,7 +54,7 @@ const o = reduce.o(items, {value: v => v + 2})
5454
// Output: {0:2, 1:3, 2:4, 3:5, 4:6}
5555
```
5656

57-
**reduce.mul* multiplies together the elements of the input array. When the input contains a non-numerical value, the output is **NaN**. The boolean values are converted to their numerical form (0 or 1).
57+
**reduce.mul** multiplies elements of the input array together. When the input contains a non-numerical value, the output is **NaN**. The boolean values are converted to their numerical form (0 or 1).
5858
```js
5959
const items = [1, 2, 5, 6]
6060
const result = reduce.mul(items)

0 commit comments

Comments
 (0)