Detalhes do pacote

@typed/sequence

TylorS17MIT1.1.0

Run things in sequence

typescript, promise, observable, stream

readme (leia-me)

@typed/sequence

Create sequential code easily

Helps you create a sequence of execution.

Let me have it!

npm install --save typed-sequence

API

sequence<T>(items: T[], f: (t: T) => any): Promise<any>

Example

import { sequence } from 'typed-sequence';

function f (n: number): Promise<any> {
  // perform some type of asynchronous (or not) operation

  return new Promise((resolve, reject) {
    // exercise for the reader ;)
  })
}

sequence([1, 2, 3], f);

changelog (log de mudanças)

1.1.0 (2016-12-23)

1.0.0 (2016-12-23)

Features

  • sequence: first implementation (eae8209)