New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mattiasbuelens/web-streams-polyfill

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

@mattiasbuelens/web-streams-polyfill - npm Package Compare versions

Comparing version 0.1.0-alpha.5 to 0.1.0

dist/polyfill.js

6

package.json
{
"name": "@mattiasbuelens/web-streams-polyfill",
"version": "0.1.0-alpha.5",
"version": "0.1.0",
"description": "Web Streams, based on the WHATWG spec reference implementation",
"main": "dist/polyfill.umd.js",
"browser": "dist/polyfill.umd.min.js",
"main": "dist/polyfill",
"browser": "dist/polyfill.min.js",
"module": "dist/polyfill.mjs",

@@ -8,0 +8,0 @@ "types": "types/polyfill.d.ts",

{
"name": "@mattiasbuelens/web-streams-ponyfill-es6",
"main": "../../dist/ponyfill.es6.cjs.js",
"main": "../../dist/ponyfill.es6",
"module": "../../dist/ponyfill.es6.mjs",
"types": "../../types/polyfill.d.ts"
}
{
"name": "@mattiasbuelens/web-streams-ponyfill",
"main": "../dist/ponyfill.cjs.js",
"main": "../dist/ponyfill",
"module": "../dist/ponyfill.mjs",
"types": "../types/polyfill.d.ts"
}

@@ -11,29 +11,52 @@ # web-streams-polyfill

For node.js / browserify users:
This project comes in three variants:
* `@mattiasbuelens/web-streams-polyfill`: a polyfill that replaces the native stream implementations.
Recommended for use in web apps through a `<script>` tag.
* `@mattiasbuelens/web-streams-polyfill/ponyfill`: a [ponyfill] that provides
the stream implementations without replacing any globals.
Recommended for use in Node applications or web libraries.
* `@mattiasbuelens/web-streams-polyfill/ponyfill/es6`: a ponyfill targeting ES2015+ environments.
Recommended for use in modern Node applications, or in web apps targeting modern browsers.
```javascript
Each variant also includes the [type definitions for WHATWG streams from DefinitelyTyped][types-streams].
var streams = require("web-streams-polyfill");
var readable = new streams.ReadableStream;
Usage as a polyfill:
```html
<script src="/path/to/web-streams-polyfill/dist/polyfill.min.js"></script>
<script>
var readable = new ReadableStream();
</script>
```
Usage as a Node library:
```js
var streams = require("@mattiasbuelens/web-streams-polyfill/ponyfill");
var readable = new streams.ReadableStream();
```
Usage as a ES2015 module:
```js
import { ReadableStream } from "@mattiasbuelens/web-streams-polyfill/ponyfill";
const readable = new ReadableStream();
```
// Or, in ES6
### Compatibility
import { ReadableStream } from "web-streams-polyfill";
The `polyfill` and `ponyfill` variants work in any ES5-compatible environment that has a global `Promise`.
If you need to support older browsers or Node versions that do not have a native `Promise` implementation
(check the [support table][promise-support]), you must first include a `Promise` polyfill
(e.g. [promise-polyfill][promise-polyfill]).
```
The `ponyfill/es6` variant works in any ES2015-compatible environment.
For use as polyfill, include the `dist/polyfill.min.js` file in your html before your main script.
### Contributors
```html
<script src="/path/to/polyfill.min.js"></script>
<script type="text/javascript">
Thanks to these people for their work on [the original polyfill][creatorrr-polyfill]:
var readable = new window.ReadableStream;
- Diwank Singh Tomer ([creatorrr](https://github.com/creatorrr))
- Anders Riutta ([ariutta](https://github.com/ariutta))
</script>
```
## Contributors
Thanks to these people for their contributions:
- Anders Riutta [ariutta](https://github.com/ariutta)
[ponyfill]: https://github.com/sindresorhus/ponyfill
[types-streams]: https://www.npmjs.com/package/@types/whatwg-streams
[promise-support]: https://kangax.github.io/compat-table/es6/#test-Promise
[promise-polyfill]: https://www.npmjs.com/package/promise-polyfill
[creatorrr-polyfill]: https://github.com/creatorrr/web-streams-polyfill

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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