1.0.0 • Published 1 year ago

p-queue-decorator v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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
  }
}
1.0.0

1 year ago