spliterator 1.5.0 → 1.5.2

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.
Files changed (2) hide show
  1. package/README.md +13 -11
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # Ribbon 🎀
1
+ # Spliterator 🎀
2
2
 
3
- Ribbon makes newline-delimited files easy to work with.
3
+ Spliterator is a TypeScript library for streaming delimited content such as CSV, TSV and JSONL.
4
4
 
5
- Let's say you have a huge newline-delimited JSON file that can't fit into memory.
5
+ Let's say you have a huge newline-delimited JSON file that can't fit into memory:
6
6
 
7
7
  ```js
8
8
  {"name": "Jessie", "age": 30}
@@ -11,7 +11,7 @@ Let's say you have a huge newline-delimited JSON file that can't fit into memory
11
11
  // Several hundred thousand more lines...
12
12
  ```
13
13
 
14
- Ribbon can help you read it line-by-line:
14
+ Spliterator can help you read it line-by-line without loading the entire file into memory:
15
15
 
16
16
  ```ts
17
17
  import { JSONSpliterator } from "spliterator"
@@ -28,7 +28,8 @@ for await (const line of reader) {
28
28
  }
29
29
  ```
30
30
 
31
- [![NPM Version](https://img.shields.io/npm/v/%40sister.software%2Fribbon)](https://www.npmjs.com/package/spliterator)
31
+ [![NPM Version](https://img.shields.io/npm/v/spliterator)](https://www.npmjs.com/package/spliterator)
32
+ ![NPM License](https://img.shields.io/npm/l/spliterator)
32
33
 
33
34
  # Installation
34
35
 
@@ -42,7 +43,7 @@ npm install spliterator
42
43
 
43
44
  ## Character-delimited files
44
45
 
45
- While Ribbon supports any delimited byte stream, it's particularly useful for character-delimited content such as comma-separated values (CSV), tab-separated values (TSV) – or any other delimiter you can think of.
46
+ While Spliterator supports any delimited byte stream, it's particularly useful for character-delimited content such as comma-separated values (CSV), tab-separated values (TSV) – or any other delimiter you can think of.
46
47
 
47
48
  ```csv
48
49
  Full Name, Occupation, Age
@@ -81,12 +82,13 @@ for await (const columns of reader) {
81
82
 
82
83
  ## Advanced usage
83
84
 
84
- Ribbon is designed to be simple to use, but also flexible and powerful.
85
- For more advanced use cases, check out our tests in the `test` directory, or our fully-annotated source code.
85
+ Spliterator includes a collection of low-level classes and interfaces that can be used to create custom generators for any kind of delimited content.
86
+
87
+ For more advanced usage, check out our tests in the `test` directory, or our fully-annotated source code.
86
88
 
87
89
  ### Reading from a stream
88
90
 
89
- All Ribbon generators implement the `Generator` and `AsyncGenerator` interfaces, so you can use them in `for...of` and `for await...of` loops, as well the web-native [ReadableStreams](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream), so you can use them in `for await...of` loops, as well as piping them through transformations to avoid nested and partially materialized streams.
91
+ All included Spliterators implement the `Generator` and `AsyncGenerator` interfaces, so you can use them in `for...of` and `for await...of` loops, as well the web-native [ReadableStreams](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream), so you can use them in `for await...of` loops, as well as piping them through transformations to avoid nested and partially materialized streams.
90
92
 
91
93
  ```ts
92
94
  import { JSONSpliterator } from "spliterator"
@@ -107,11 +109,11 @@ for await (const line of stream) {
107
109
 
108
110
  ### Custom generators
109
111
 
110
- While Ribbon includes premade exports for most use-cases, custom generators can be created via `DelimitedGenerator`. This class is a low-level interface that allows you to create your own generators for any kind of delimited content.
112
+ While Spliterator includes premade exports for most use-cases, custom generators can be created via `Spliterator` and `AsyncSpliterator`. This class is a low-level interface that allows you to create your own generators for any kind of delimited content.
111
113
 
112
114
  # License
113
115
 
114
- Ribbon is licensed under the AGPL-3.0 license. Generally,
116
+ Spliterator is licensed under the AGPL-3.0 license. Generally,
115
117
  this means that you can use the software for free, but you must share
116
118
  any modifications you make to the software.
117
119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spliterator",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Line-delimited file utilities",
5
5
  "keywords": [
6
6
  "csv",
@@ -10,13 +10,13 @@
10
10
  "line-delimited",
11
11
  "delimited"
12
12
  ],
13
- "homepage": "https://github.com/sister-software/ribbon",
13
+ "homepage": "https://github.com/sister-software/spliterator",
14
14
  "bugs": {
15
- "url": "https://github.com/sister-software/ribbon/issues"
15
+ "url": "https://github.com/sister-software/spliterator/issues"
16
16
  },
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "git+https://github.com/sister-software/ribbon.git"
19
+ "url": "git+https://github.com/sister-software/spliterator.git"
20
20
  },
21
21
  "license": "AGPL-3.0-only",
22
22
  "contributors": [
@@ -86,7 +86,7 @@
86
86
  },
87
87
  "packageManager": "yarn@4.5.1",
88
88
  "engines": {
89
- "node": ">= 10.0.0"
89
+ "node": ">= 20.18.1"
90
90
  },
91
91
  "publishConfig": {
92
92
  "access": "public",