Socket
Book a DemoInstallSign in
Socket

scramjet-hello-module

Package Overview
Dependencies
Maintainers
4
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scramjet-hello-module

An example module for scramjet.

latest
Source
npmnpm
Version
1.0.64
Version published
Maintainers
4
Created
Source

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!

Keywords

stream

FAQs

Package last updated on 21 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts