JSPM

stream-enumerate

0.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q8183F
  • License ISC

Add a number ID to the chunks in a stream

Package Exports

  • stream-enumerate

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 (stream-enumerate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build Status Coverage Status

stream-enumerate

Add a number ID to the chunks in a stream

This module allow to identify the data chunks based on their order inside the stream, or based on their offset.

Install

npm install stream-enumerate

API

enumerate

Identify data chunks consecutively

  • options: options passed to underlying Transform stream
    • end: last ID assigned to data chunks, after it the stream will finish
    • idField: field where the data chunk ID will be stored
    • start: first ID assigned to data chunks

start

Enumerate data chunks based on their offset

  • options: options passed to underlying Transform stream
    • end: last ID/byte assigned to data chunks, after it the stream will finish
    • idField: field where the data chunk ID will be stored
    • start: first ID/byte assigned to data chunks