@typed/sequence
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@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);

Package Sidebar

Install

npm i @typed/sequence

Weekly Downloads

2

Version

1.1.0

License

MIT

Last publish

Collaborators

  • typed