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

pull-flatten-deep

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pull-flatten-deep

Pull-stream which recursively flattens streams of streams

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

pull-flatten-deep

npm version build status test coverage downloads js-standard-style

Pull-stream which recursively flattens streams of streams.

Usage

const pull = require('pull-stream')
const flattenDeep = require('pull-flatten-deep')

 pull(
  pull.values([1, 2, pull.values([3, 4, pull.values([5, 6]), 7, 8, pull.values([9, 10, pull.values([11, 12])])])]),
  flattenDeep(),
  pull.collect(function (err, all) {
    console.log(all.toString() === [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].toString())
    // true
  })
)

API

flattenDeep

Usage: pull(source, flattenDeep(), sink)

Provides a pull stream through which flattens nested streams, and like pull.flatten, runs them sequentially.

Installation

$ npm install pull-flatten-deep

Acknowledgement

This function is heavily based on [dominictarr]'s original pull.flatten. Imitation is the sincerest form of flattery.

License

MIT dominictarr

Keywords

FAQs

Package last updated on 13 Apr 2017

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