1.1.1 • Published 2 months ago

@master4n/decorators v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

@master4n/decorators

Owner Badge Package Version Package License Package Downloads

Installation

npm install @master4n/decorators

Usage

As a library

With CommonJS in JavaScript,

const { Value } = require('@master4n/decorators')

With ESM or TypeScript,

import { Value } from '@master4n/decorators'
class Token {
    @Value('fix.token')
    fixToken: string
}

Summary

This package contains decorators for any applications. Kindly set true for the below property in your tsconfig.json.

    "experimentalDecorators": true,                 
    "emitDecoratorMetadata": true, 

Available Decorators

DecoratorTypeDescription
ValueClass PropertyRead the value from yaml file and assigned it to class property
GenerateIDClass PropertyAssigne unique UUID value to class property
NotNullMethod ParameterCheck if parameter is not null and undefined
CounterStatic Property ParameterCreate static counter
LogMethod ParameterLog in and out of method

Credits

These definitions were written by Master4Novice.

1.1.1

2 months ago

1.1.0

2 months ago

1.0.9

2 months ago

1.0.8

4 months ago

1.0.7

4 months ago

1.0.6

4 months ago

1.0.5

4 months ago

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