New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

concat-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

concat-iterable

Traverse every elements of several iterables sequentially or one iterable repeatedly

latest
Source
npmnpm
Version
3.0.1
Version published
Maintainers
1
Created
Source

concat-iterable

Requirements

  • Node >= 6.0.0

Features

  • Traverse every elements of several iterables sequentially

  • Traverse one iterable repeatedly

Usage

Import

var ConcatIterable = require('concat-iterable');

Constructor

Traverse every elements of several iterables sequentially

Form

var concat = new ConcatIterable(...iterables);

Where:

  • ...iterables are iterable objects

  • sum is an iterable object (which may be finite or even endless)

Example

var alphabet = new ConcatIterable('abc', 'def', 'ghi', 'jkl', 'mno', 'pqrs', 'tuv', 'wxyz');
console.log([...alphabet]);

You would seen an array of alphabet

Function: ::multiply a.k.a ::times

Traverse one iterable repeatedly

Form

repeat = ConcatIterable.multiply(iterable, count);

Where:

  • iterable is a finite iterable object

  • count is an unsigned integer which represents number of times to iterate through iterable

  • repeat is an finite iterable object but with count times longer than iterable

Example

var tribledabc = ConcatIterable.multiply('abc', 3);
console.log([...tribledabc]);

Similar to new ConcatIterable('abc', 'abc', 'abc') - i.e. 'abcabcabc', you would seen ['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c']

Keywords

concat-iterable

FAQs

Package last updated on 11 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