JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3758
  • Score
    100M100P100Q173652F
  • License MIT

Helpful decorators for typescript applications

Package Exports

  • helpful-decorators

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (helpful-decorators) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build Status Commitizen friendly semantic-release Awesome

Helpful Decorators For Typescript Projects

Installation

npm install helpful-decorators
yarn add helpful-decorators

Usage

timeout - Add setTimeout functionality to the method

import { timeout } from 'helpful-decorators';

class Test {
 @timeout(1000)
 method() {
   // ...
 }
}

debounce - Add debounce functionality to the method (options)

import { debounce } from 'helpful-decorators';

class Test {
 @debounce(1000, options)
 method() {
   // ...
 }
}

throttle - Add throttle functionality to the method (options)

import { throttle } from 'helpful-decorators';

class Test {
 @throttle(1000, options)
 method() {
   // ...
 }
}

once - Add once functionality to the method

import { once } from 'helpful-decorators';

class Test {
 @once
 method() {
   // This will run only once
 }
}

Roadmap

  • timeout
  • debounce
  • throttle
  • once
  • memoize
  • ...

License

MIT