UNPKG

@push.rocks/smartstream

Version:

A library to simplify the creation and manipulation of Node.js streams, providing utilities for handling transform, duplex, and readable/writable streams effectively in TypeScript.

16 lines (12 loc) 454 B
// @push.rocks scope import * as smartenv from '@push.rocks/smartenv'; export { smartenv, } // lets setup dependencies const smartenvInstance = new smartenv.Smartenv(); await smartenvInstance.getSafeNodeModule<typeof import('stream/web')>('stream/web', async (moduleArg) => { globalThis.ReadableStream = moduleArg.ReadableStream; globalThis.WritableStream = moduleArg.WritableStream; globalThis.TransformStream = moduleArg.TransformStream; })