Noosphere Possibilities Maximized

    async-generators
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.1 • Public • Published

    async-generators

    logo

    convenience package combining the down-compiled @async-generators packages

    NPM version Travis Status Coverage Dependencies Greenkeeper

    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
    

    Install

    npm i async-generators

    DownloadsWeekly Downloads

    87

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    52.4 kB

    Total Files

    67

    Last publish

    Collaborators

    • meirionhughes