kingjs/linq.append
@Generates an sequence identical to another sequence but with a value added to the end.
Usage
Append 3
to the sequence 0
, 1
, 2
like this:
var append = require('@kingjs/linq.append');
var sequence = require('@kingjs/enumerable.create');
var toArray = require('@kingjs/linq.to-array');
var enumerable = sequence(0, 1, 2);
var result = append.call(enumerable, 3);
toArray.call(result);
result:
[0, 1, 2, 3]
API
declare function append(
this: Enumerable,
value
): Enumerable
Interfaces
-
Enumerable
: See @kingjs/enumerable.define.
Parameters
-
this
: A sequence of values. -
value
: The value to append.
Return Value
Returns a sequence with value
appended.
Install
With npm installed, run
$ npm install @kingjs/linq.append
Acknowledgments
Like Enumerable.Append
License
MIT