@kingjs/enumerable.create

Creates an Enumerable out of `arguments`.

Stats

StarsIssuesVersionUpdatedCreatedSize
@kingjs/enumerable.create
1.0.13 years ago3 years agoMinified + gzip package size for @kingjs/enumerable.create in KB

Readme

@kingjs/enumerable.create

Creates an Enumerable out of arguments.

Usage

Create an Enumerable from the arguments 1, 2, and 3 like this:

var sequence = require('@kingjs/enumerable.create')

var enumerable = sequence(0, 1, 2);
var enumerator = enumerable.getEnumerator();

var result = [];
while (enumerator.moveNext()) 
  result.push(enumerator.current);

result;

result:

[0, 1, 2];

API

declare function create(
  ...args: any[]
): Enumerable

Interfaces

  • Enumerable: See @kingjs/enumerable.define.

    Parameters

  • args: The values returned as an Enumerable.

    Return Value

  • Returns an Enumerable which generates args.

Install

With npm installed, run

$ npm install @kingjs/enumerable.create

License

MIT

Analytics

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.