JSPM

@cubbit/web-file-stream

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 213
  • Score
    100M100P100Q93096F
  • License MIT

Node's file stream APIs for the web

Package Exports

  • @cubbit/web-file-stream

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cubbit/web-file-stream) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Web file stream Build Status license npm

Node's file stream APIs for the web.

import {WebFileStream} from '@cubbit/web-file-stream';

const file = new File(['My test file'], 'test-file.txt', {
    type: 'text/plain'
});

const read_stream = WebFileStream.create_read_stream(file);

read_stream.on('error', console.error);
read_stream.on('data', (data) => console.log(data));
read_stream.on('end', () => console.log('File read!'));

Installation

This is a module available through the npm registry. Installation is done using the npm install command:

npm install @cubbit/web-file-stream

Features

  • Automatic backpressuring
  • Compatibility with File object API
  • Same API as Node.js Stream objects

Tests

To run the test suite, first install the dependencies, then run npm test:

npm install
npm test

License

MIT