Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

docs: fs already defined in example #1

Merged
merged 2 commits into from
Jul 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/car/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* import { car } from '@helia/car'
* import { CarWriter } from '@ipld/car'
* import { Readable } from 'node:stream'
* import fs from 'node:fs'
* import nodeFs from 'node:fs'
*
* const helia = createHelia({
* // ... helia config
Expand All @@ -30,7 +30,7 @@
* const { writer, out } = await CarWriter.create(cid)
*
* // `out` needs to be directed somewhere, see the @ipld/car docs for more information
* Readable.from(out).pipe(fs.createWriteStream('example.car'))
* Readable.from(out).pipe(nodeFs.createWriteStream('example.car'))
*
* // write the DAG behind `cid` into the writer
* await c.export(cid, writer)
Expand All @@ -44,14 +44,14 @@
* import { car } from '@helia/car'
* import { CarReader } from '@ipld/car'
* import { Readable } from 'node:stream'
* import fs from 'node:fs'
* import nodeFs from 'node:fs'
*
* const helia = createHelia({
* // ... helia config
* })
*
* // import the car
* const inStream = fs.createReadStream('example.car')
* const inStream = nodeFs.createReadStream('example.car')
* const reader = await CarReader.fromIterable(inStream)
*
* await c.import(reader)
Expand Down