1.4.1 • Published 8 years ago

transform-spread-iterable v1.4.1

Weekly downloads
100
License
MIT
Repository
github
Last release
8 years ago

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

1.4.1

8 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago