async-generators

convenience package combining the @async-generator packages

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
async-generators
0.2.16 years ago7 years agoMinified + gzip package size for async-generators in KB

Readme

async-generators
logo
convenience package combining the down-compiled @async-generators packages
!NPM versionnpm-imagenpm-url !Travis Statustravis-imagetravis-url !Coveragecodecov-imagecodecov-url !Dependenciesdep-imagedep-url !Greenkeepergreen-imagegreen-url
Exports Typescript

Exports


equal

@async-generators/equal
compare two iterator sequences for equality
let sequence = async function* () {
  yield 1; yield 2; yield 3;
}

let result = await equal(sequence(), sequence());

Typescript

This library is fully typed and can be used by importing the methods you want to use.
foo.ts
import {equal} from 'async-generators');

async function main(){
  let sequence = async function* () {
    yield 1; yield 2; yield 3;
  }

  let result = await equal(sequence(), sequence());
  
  console.log("equal:", result);
}

main();

It is also possible to directly execute your properly configured typescript with ts-node:
ts-node --harmony_async_iteration foo.ts