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

transform-spread-iterable

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

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

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
673
decreased by-82.12%
Maintainers
1
Weekly downloads
 
Created
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-operator');

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

Package last updated on 07 Oct 2016

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