https://github.com/sequencemedia/write
https://github.com/sequencemedia/write
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/sequencemedia/write
- Owner: sequencemedia
- Created: 2024-09-03T21:02:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-14T03:23:12.000Z (about 1 year ago)
- Last Synced: 2025-06-14T03:33:26.845Z (about 1 year ago)
- Language: JavaScript
- Size: 712 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @sequencemedia/write
Intercept writes to a writable stream and duplicate them on another writable stream
```javascript
import {
stdout,
stderr
} from 'node:process'
import {
createWriteStream
} from 'node:fs'
import write from '@sequencemedia/write'
stdout.write = write(stdout, createWriteStream('./stdout.txt'))
stderr.write = write(stderr, createWriteStream('./stderr.txt'))
console.log('Write to the console and `./stdout.txt`')
console.error('Write to the console and `./stderr.txt`')
```