Skip to content

Commit

Permalink
Rename package and add logo
Browse files Browse the repository at this point in the history
  • Loading branch information
bidoubiwa committed Jul 27, 2021
1 parent bc1cd23 commit 1577c85
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
33 changes: 22 additions & 11 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
# json-stream-concat

json-stream-concat is a CLI tool that combines all json files found in a directory into one big json file using streaming to avoid out-of-memory.

<center>

# json-boat

<img src="assets/boat.png" width=300 />

</center>

json-boat is a tool that combines all json files found in a directory into one big json file using streaming to avoid out-of-memory.

Both `read` and `write` actions are done using `streaming`. The maximum data stored in memory is the buffer size.


## Input/Output

The output JSON file contains an array with all the inputed JSON files.
So if your JSON file contained `{ "id": 1 }` it will be stored in the output file like this:
So if your JSON file contained `{ "id": 1 }` it will be stored in the output file like this `[{"id": 1}]`

Input files:
Some examples:

file 1:
Input files:
```json
{ "id": 1 }
```

file 2:
```json
{ "id": 2 }
```
Expand Down Expand Up @@ -55,23 +66,23 @@ Output file:
CLI:

```bash
npx combine-json [options]
npx json-boat [options]
```

Library:

```bash
# yarn
yarn add combine-json
yarn add json-boat

# npm
npm install combine-json
npm install json-boat
```


## Usage

Combine-json has two options:
json-boat takes two parameters:

- Input dir: the path to the directory containing all the jsons.
- Output file _optional_: path to the output file.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "combine-json",
"description": "Combine with streams multiple json files into one json file.",
"name": "json-boat",
"description": "Combine with streams multiple json files into one json array. Read and Write is streamed.",
"version": "0.1.0",
"main": "src/index.js",
"scripts": {
Expand Down

0 comments on commit 1577c85

Please sign in to comment.