JSPM

intersect-arrays-to-stream

0.0.3
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 188
    • Score
      100M100P100Q70967F
    • License MIT

    A utility that takes 1 or more sorted arrays and emits a node stream event whenever an intersection is found

    Package Exports

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

    Readme

    intersect-arrays-to-stream

    Takes an arbitrary amount of sorted arrays and returns the intersect as a stream

      var iats = require('intersect-arrays-to-stream')
      
      var arr = [
        "Lorem ipsum dolor sit amet, ea movet euismod deserunt sed. Te has doming antiopam postulant.".split(' ').sort(),
        "Lorem ipsum dolor sit amet, ea movet euismod deserunt sed.".split(' ').sort(),
        "ea movet euismod deserunt sed. Te has doming antiopam postulant.".split(' ').sort()
      ]
      
      iats.getIntersectionStream(arr).pipe(process.stdout)       // deserunteaeuismodmovetsed.