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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    11
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    11
  • 1.0.0
    0

Package Sidebar

Install

npm i @typed/sequence

Weekly Downloads

11

Version

1.1.0

License

MIT

Last publish

Collaborators

  • typed