Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browser-stream-util

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-stream-util

utility functions for web streams

  • 1.3.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.5K
increased by28.11%
Maintainers
0
Weekly downloads
 
Created
Source

npm License Typed with TypeScript bundlejs downloads GitHub Issues Build Status Styled with prettier Commitizen friendly Known Vulnerabilities Coverage Status

browser-stream-util

utility functions for web streams

API

Table of Contents

iteratorToStream

Converts an iterator into a ReadableStream.

Parameters

  • iterator (AsyncIterator<Uint8Array> | Iterator<Uint8Array>)

Returns ReadableStream

stringToStream

Encodes a string into a ReadableStream.

Parameters

Returns ReadableStream

uint8ToStream

Encodes a uint8 array into a ReadableStream.

Parameters

Returns ReadableStream

streamToString

Reads web stream content into a string.

Parameters

  • stream ReadableStream
  • decoder TextDecoder? (optional, default new TextDecoder())

Returns Promise<string>

streamToUint8Array

Reads web stream content into a Uint8Array.

Parameters

  • stream ReadableStream

Returns Promise<Uint8Array>

emptyStream

Delivers a zero length ReadableStream with no data.

Returns ReadableStream

install

With npm do:

npm install browser-stream-util

license

BSD-2-Clause

Keywords

FAQs

Package last updated on 20 Nov 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc