xen-orchestra/@vates/decorate-with/README.md
2020-06-12 11:12:49 +02:00

1.2 KiB

@vates/decorate-with

Package Version License PackagePhobia Node compatibility

Creates a decorator from a function wrapper

Install

Installation of the npm package:

> npm install --save @vates/decorate-with

Usage

For instance, allows using Lodash's functions as decorators:

import { decorateWith } from '@vates/decorate-with'

class Foo {
  @decorateWith(lodash.debounce, 150)
  bar() {
    // body
  }
}

Contributions

Contributions are very welcomed, either on the documentation or on the code.

You may:

  • report any issue you've encountered;
  • fork and create a pull request.

License

ISC © Vates SAS