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

@stardazed/streams

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stardazed/streams

Web Streams implementation / polyfill

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
182
decreased by-41.1%
Maintainers
1
Weekly downloads
 
Created
Source

sd-streams

This library provides a full implementation of the web streams standard. It has no dependencies and can be used as a streams testing bed or polyfill in browsers without (full) support for the streams standard.

It also provides a full set of TypeScript types for the library as an improvement over the incomplete typings in the TS standard library.

Limitations

While the full streams API is implemented, because it is written as a client library it cannot directly be used with other built-in APIs, such as calling getReader on the body of a fetch call, that may either not be implemented at all or return a browser internal ReadableStream. Due to implementation details of streams, you cannot mix and match the types in this implementation with those provided by the browser.

In addition, while the BYOB variant of ReadableStream is implemented, buffers are copied and not transferred as no browser has implemented detached buffers yet, let alone exposed them to client-level code.

Installation

⚠️ Important: This package is distributed as an ES2015 module and is intended for use in browsers, not in NodeJS per se. Browser-specific types may be used.

npm install @stardazed/streams
pnpm install @stardazed/streams
yarn add @stardazed/streams

Usage

See the Web Streams Standard Specification for documentation, examples, etc.

© 2018 by Arthur Langereis - @zenmumbler

License

MIT

FAQs

Package last updated on 27 Jun 2018

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