Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@master4n/decorators

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@master4n/decorators

Common Decorators Library

Source
npmnpm
Version
1.1.2
Version published
Weekly downloads
243
-71%
Maintainers
1
Weekly downloads
 
Created
Source

@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.

Keywords

decorators

FAQs

Package last updated on 04 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts