Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oresoftware/prepend-transform
Uses a Node.js transform stream to prepend the given string to the front of each line.
https://github.com/oresoftware/prepend-transform
newline nodejs nodejs-stream nodejs-streams stderr stdout stream transform-streams
Last synced: 2 months ago
JSON representation
Uses a Node.js transform stream to prepend the given string to the front of each line.
- Host: GitHub
- URL: https://github.com/oresoftware/prepend-transform
- Owner: ORESoftware
- License: mit
- Created: 2017-06-20T22:55:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-11T07:04:07.000Z (over 5 years ago)
- Last Synced: 2024-10-12T23:42:13.170Z (3 months ago)
- Topics: newline, nodejs, nodejs-stream, nodejs-streams, stderr, stdout, stream, transform-streams
- Language: TypeScript
- Homepage:
- Size: 26.4 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
[![Version](https://img.shields.io/npm/v/prepend-transform.svg?colorB=green)](https://www.npmjs.com/package/prepend-transform)
# Prepend-Transform
>
> Prepend text to the beginning of each line in a stream.
>## Installation
```bash
npm install -S prepend-transform
```## Usage
```javascript
import pt from 'prepend-transform';
import * as cp from 'child_process';const n = cp.spawn('bash');
n.stdout.pipe(pt('child stdout: ')).pipe(process.stdout);
n.stderr.pipe(pt('child stderr: ')).pipe(process.stderr);```