@kingjs/linq.concat

Concatenates two sequences.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@kingjs/linq.concat
1.0.104 years ago4 years agoMinified + gzip package size for @kingjs/linq.concat in KB

Readme

Concatenates two sequences.

Usage

require('kingjs')

var assert = require('assert');

var Concat = require('@kingjs/linq.concat');
var { GetEnumerator } = require('@kingjs/i-enumerable');
var { MoveNext, Current } = require('@kingjs/i-enumerator');

var result = [0, 1][Concat]([1, 2]);

var enumerator = result[GetEnumerator]();
assert(enumerator[MoveNext]());
assert(enumerator[Current] == 0);

assert(enumerator[MoveNext]());
assert(enumerator[Current] == 1);

assert(enumerator[MoveNext]());
assert(enumerator[Current] == 1);

assert(enumerator[MoveNext]());
assert(enumerator[Current] == 2);

assert(!enumerator[MoveNext]());

Parameters

  • this: The first sequence to concatenate.
  • enumerable: The second sequence to concatenate.

Returns

An IEnumerable that contains the concatenated elements of the two input sequences.

Install

With npm installed, run
$ npm install @kingjs/linq.concat

Dependencies

|Package|Version| |---|---| |@kingjs/i-enumerable|^1.0.6| |@kingjs/i-enumerator|^1.0.7| |@kingjs/reflect.export-extension|^1.0.1| |@kingjs/reflect.implement-i-enumerable|^1.0.0|

Source

https://repository.kingjs.net/linq/concat

License

MIT
Analytics