# @fastpointopensource/fp-utils

> Various utilities (logging, generating hex values, etc..)

Latest version **1.1.0** (published 2019-07-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install @fastpointopensource/fp-utils
pnpm add @fastpointopensource/fp-utils
yarn add @fastpointopensource/fp-utils
bun add @fastpointopensource/fp-utils
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-07-29 |
| First published | 2019-04-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | brice@fastpoint.net |
| Maintainers | bricefastpoint |

## Links

- npm: https://www.npmjs.com/package/@fastpointopensource/fp-utils
- npm.io page: https://npm.io/package/@fastpointopensource/fp-utils

## Dependencies (2)

- [generic-hex-dump](https://npm.io/package/generic-hex-dump.md) ^1.2.0
- [@log4js-node/log4js-api](https://npm.io/package/@log4js-node/log4js-api.md) ^1.0.2

## Recent versions

- 1.1.0 (latest) — 2019-07-29
- 1.0.0 — 2019-04-29

## README

# fp-utils package description

this package is intended to add utility lib to fastpoint nodejs developments. This lib contains the following methods:

## Installation

```bash
$ npm install @fastpointopensource/fp-utils
```

## Use

```js
const utils = require('@fastpointopensource/fp-utils')
```

## Methods

### .lwp(label, text)

console logging method to display a label padded (30) with dots and some text.

```
label....................... text
```

### .logtitle(label, displayFullTitle)

console logging method to display a label with some formatting.

When `displayFullTitle = false`
```
+++++++++++++++++++++++++++++++++++++++++++++ title ++++++++++++++++++++++++++++++++++++++++++++++++
```
When `displayFullTitle = true`
```
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++ title ++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
```


### .hexdump(label, buf, displayOffset, displayValue)

hexdump in the console a buffer with a label. Starting offset can be set. Value in ascii can be enabled.
`hexdump("hexdump",Buffer.from("c78dde55e55bae27,"hex",0,true))`
```
hexdump....................... c78d de55 e55b ae27    ...U.[.'
```

 ### .randomValueHex(len)

generates a hex number of *len* bytes returned as a string (not a buffer!)

### .logger

log4js logger available.
log file

```
utils.configureLog(logFilename)
utils.logger.info('test')
```

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