cpietrzykowski / js-value-separated-iterable

A value separated iterable for (Java|Type)script.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

value separated iterable

npm

Creates a value separated iterable (and iterator) with provided separator separating values traversed by base iterable.

Installing

> npm install --save @cpietrzykowski/value-separated-iterable

Using

import { ValueSeparatedIterable } from 'value-separated-iterable';

console.log([...ValueSeparatedIterable(['foo', 'baz'], 'bar')]);
// ['foo', 'bar', 'baz']

console.log([...ValueSeparatedIterable(Array(10).keys(), '$')]);
// [0, '$', 1, '$', 2, '$', 3, '$', 4, '$', 5, '$', 6, '$', 7, '$', 8, '$', 9]

About

A value separated iterable for (Java|Type)script.

License:MIT License


Languages

Language:TypeScript 90.2%Language:JavaScript 9.8%