Skip to content

Commit

Permalink
docs: convert examples to esm
Browse files Browse the repository at this point in the history
  • Loading branch information
wkillerud committed Jul 29, 2024
1 parent e1c4fa8 commit 8b62834
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ npm install @eik/sink-memory
```

```js
const { pipeline } = require('stream');
const express = require('express');
const Sink = require('@eik/sink-memory');
import { pipeline } from 'node:stream';
import express from 'express';
import Sink from '@eik/sink-memory';

const app = express();
const sink = new Sink();
Expand Down Expand Up @@ -46,7 +46,7 @@ This method takes the following arguments:
Resolves with a writable stream.

```js
const { pipeline } = require('stream);
import { pipeline } from 'node:stream';

const fromStream = new SomeReadableStream();
const sink = new Sink({ ... });
Expand Down Expand Up @@ -74,7 +74,7 @@ the file and a readable stream with the byte stream of the file on the
`.stream` property.

```js
const { pipeline } = require('stream);
import { pipeline } from 'node:stream';

const toStream = new SomeWritableStream();
const sink = new Sink({ ... });
Expand Down

0 comments on commit 8b62834

Please sign in to comment.