1.0.4 • Published 4 months ago

server-decorator v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
4 months ago

Server Decorator

A TypeScript library for server-side decorators.

Installation

To install the package, use npm or yarn:

npm install server-decorator

or

yarn add server-decorator

Usage

Importing the Decorators

import { cache, tracking } from 'server-decorator';

Example

Cache Decorator

import { cache } from 'server-decorator';

class ExampleService {
  @cache()
  getData() {
    // Your implementation here
  }
}

Tracking Decorator

import { tracking } from 'server-decorator';

class ExampleService {
  @tracking()
  trackData() {
    // Your implementation here
  }
}

Scripts

  • build: Compiles the TypeScript code.
  • test: Runs the tests using Jest.
  • publish-package: Publishes the package to npm.

Running Tests

To run the tests, use the following command:

npm run test

or

yarn run test

Publishing

To publish the package, use the following command:

npm run publish-package

or

yarn run publish-package

Make sure you have configured your npm token in the .npmrc file.

License

This project is licensed under the ISC License.

1.0.4

4 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago