Skip to content

Commit 022b345

Browse files
author
mochatek
committed
chore: Setup tooling
1 parent 8c515cf commit 022b345

File tree

12 files changed

+644
-30
lines changed

12 files changed

+644
-30
lines changed

.gitignore

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1-
node_modules
2-
dist
3-
tests
1+
# Dependencies
2+
node_modules/
3+
4+
# Build output
5+
dist/
6+
7+
# IDE and editor files
8+
.idea/
9+
.vscode/
10+
*.swp
11+
*.swo
12+
13+
# OS files
14+
.DS_Store
15+
Thumbs.db
16+
17+
# Test coverage
18+
coverage/
19+
20+
# Logs
21+
logs/
22+
*.log
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# Environment variables
28+
.env
29+
.env.local
30+
.env.*.local

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package-lock=true
2+
save-exact=true
3+
engine-strict=true

.prettierignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Dependencies
2+
node_modules
3+
package-lock.json
4+
5+
# Build outputs
6+
dist
7+
8+
# Environment and config
9+
.env
10+
.env.*
11+
!.env.example
12+
13+
# Logs
14+
*.log
15+
npm-debug.log*
16+
17+
# IDE and editor files
18+
.idea
19+
.vscode
20+
21+
# Git hooks
22+
.husky
23+
24+
# OS generated files
25+
.DS_Store

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"arrowParens": "always",
3+
"bracketSpacing": true,
4+
"printWidth": 80,
5+
"semi": true,
6+
"singleQuote": false,
7+
"tabWidth": 2,
8+
"trailingComma": "all",
9+
"useTabs": false
10+
}

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import { ReadableStream } from "stream/web";
4747
import { Readable } from "stream";
4848
const response = await fetch("https://www.example.com/json-data");
4949
const readableStream = Readable.fromWeb(
50-
response.body as unknown as ReadableStream
50+
response.body as unknown as ReadableStream,
5151
);
5252
const streamer = await createReadStream(readableStream);
5353

@@ -64,13 +64,13 @@ import { createReadStream } from "jsonarrayfs";
6464

6565
const streamer = await createReadStream<{ offer: boolean; price: number }>(
6666
"./data.json",
67-
{ encoding: "utf-8" }
67+
{ encoding: "utf-8" },
6868
);
6969

7070
// Add filter to the batch to fetch only relevant elements
7171
for await (const elements of streamer.batch(
7272
100,
73-
(element) => element.price < 500 || element.offer
73+
(element) => element.price < 500 || element.offer,
7474
)) {
7575
// Your processing logic here
7676
}

0 commit comments

Comments
 (0)