scramjet-hello-module

1.0.64 • Public • Published

A scramjet-hello-module

An example hello world scramjet module to start your work on.

Once you provide it with a stream of object with names, it'll say hello to each name.

Usage

The stream is best used with scramjet, here's how you use it:

scramjet
    .from(stream)
    .use("scramjet-hello-module", "Hi {}!");

The above is the same as writing the same without scramjet:

const helloStream = require("scramjet-hello-module");

const data = new ReadableStream();
data.write("Mike");
data.write("Alice");
data.end("Sam");

const out = helloStream(data, "Hello {}!\n");

out.pipe(process.stdout);
// Hello Mike!
// Hello Alice!
// Hello Sam!

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.642latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.642
1.0.630
1.0.620
1.0.610
1.0.600
1.0.590
1.0.580
1.0.570
1.0.563
1.0.550
1.0.540
1.0.520
1.0.510
1.0.500
1.0.490
1.0.480
1.0.470
1.0.460
1.0.450
1.0.440
1.0.430
1.0.420
1.0.410
1.0.400
1.0.330
1.0.150
1.0.100
1.0.20

Package Sidebar

Install

npm i scramjet-hello-module

Weekly Downloads

5

Version

1.0.64

License

MIT

Unpacked Size

3.89 kB

Total Files

10

Last publish

Collaborators

  • patu
  • scramjetorg
  • michalcz
  • stoq