Socket
Socket
Sign inDemoInstall

transform-spread-iterable

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    transform-spread-iterable

An iterable transform that spread each iterable received and emit its items


Version published
Maintainers
1
Install size
22.8 kB
Created

Readme

Source

transform-spread-iterable

An iterable transform that spread each iterable received and emit its items

background details relevant to understanding what this module does

Usage

Let's spread the arr array, each item of arr will became an item of resulting iterable:

const spread = require('transform-spread-iterable');

const arr = [1, 2, 3];

for (const item of spread([arr, 42, 43])) {
	console.log({item});
}

This will output

{item :1}
{item :2}
{item :3}
{item :42}
{item :43}

Travis Build Status Code Climate Coverage Status

NPM downloads

API

const spread = (iterable: Iterable): Iterable

Given a source iterable, return an iterable with all source item that are iterable spreaded.

Install

With npm installed, run

$ npm install transform-spread-iterable

See Also

License

MIT

FAQs

Last updated on 07 Oct 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc