0.1.4 • Published 7 months ago

@ersanyamarya/common-node-utils v0.1.4

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

common-node-utils

This library was generated with Nx. It exports several utility modules:

  • logger-type: Contains types or interfaces related to logging functionality. You can use the setLogger and setLogLevel functions to customize the logger and log level. The logger has methods for different log levels: debug, info, warn, error, fatal, and log.

Example usage:

import { logger, setLogger, setLogLevel } from 'common-node-utils/logger-type'

setLogLevel('debug')
logger.debug('This is a debug message')
  • random-token: Contains a function randomTokenGenerate for generating random tokens, often used for security purposes.

Example usage:

import { randomTokenGenerate } from 'common-node-utils/random-token'

const token = randomTokenGenerate(10)
console.log(token)
  • date-time: Contains a function dateAfter48Hours that returns the date and time 48 hours from the current time.

Example usage:

import { dateAfter48Hours } from 'common-node-utils/date-time'

const futureDate = dateAfter48Hours()
console.log(futureDate)
  • console-colors: Contains an object colors that contains escape sequences for different console colors.

  • colored-console: Contains a custom logger customLogger that logs messages in different colors based on the log level.

Example usage:

import { customLogger } from 'common-node-utils/colored-console'

customLogger.error('This is an error message')
0.1.0

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.0.9

9 months ago

0.1.4

7 months ago

0.1.3

8 months ago

0.0.6

9 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago