# @ersanyamarya/common-node-utils

> This library was generated with [Nx](https://nx.dev). It exports several utility modules:

Latest version **0.1.4** (published 2023-09-27) · 0 weekly downloads

## Install

```sh
npm install @ersanyamarya/common-node-utils
pnpm add @ersanyamarya/common-node-utils
yarn add @ersanyamarya/common-node-utils
bun add @ersanyamarya/common-node-utils
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2023-09-27 |
| First published | 2023-04-19 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ersanyamarya |

## Links

- npm: https://www.npmjs.com/package/@ersanyamarya/common-node-utils
- npm.io page: https://npm.io/package/@ersanyamarya/common-node-utils

## Recent versions

- 0.1.4 (latest) — 2023-09-27
- 0.1.3 — 2023-09-26
- 0.1.2 — 2023-09-26
- 0.1.1 — 2023-09-25
- 0.1.0 — 2023-09-25
- 0.0.9 — 2023-08-09
- 0.0.6 — 2023-08-09
- 0.0.5 — 2023-06-16
- 0.0.4 — 2023-06-01
- 0.0.3 — 2023-04-19
- 0.0.2 — 2023-04-19
- 0.0.1 — 2023-04-19

## README

# common-node-utils

This library was generated with [Nx](https://nx.dev). 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:
```typescript
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:
```typescript
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:
```typescript
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:
```typescript
import { customLogger } from 'common-node-utils/colored-console'

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

---
_Source: https://npm.io/package/@ersanyamarya/common-node-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
