p-queue-decorator
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

p-queue-decorator

Decorator, that wraps your class methods with dedicated p-queue instances

Example

import { PQueue } from 'p-queue-decorator'

class Test {
  @PQueue(/* optional https://github.com/sindresorhus/p-queue#options */)
  async method(a: number, b: number) {
    return a + b // method call will be through PQueue instance
  }
  
  @PQueue()
  async method2(a: number, b: number) {
    return a + b // for this method another PQueue instance will be used
  }
}

/p-queue-decorator/

    Package Sidebar

    Install

    npm i p-queue-decorator

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    2.23 kB

    Total Files

    4

    Last publish

    Collaborators

    • darrrk