open-index/open-npm huggingface dataset:
npm package: @softonic/axios-logger
Description: Axios plugin to log all requests and responses
Author: Rubén Norte
Latest version: 1.1.3

# @softonic/axios-logger

Axios plugin to log all requests and responses

## Installation

```bash
npm install @softonic/axios-logger
```

## Usage

```js
// CommonJS
// const axiosLogger = require('@softonic/axios-logger');

// ES2015
import axiosLogger from '@softonic/axios-logger';

axiosLogger(axiosInstance, {
  logger: bunyan.createLogger({ name: "myapp" }),
  // whitelistHeaders and blacklistHeaders should not be used together
  whitelistRequestHeaders: [ 'host', 'accept' ],
  whitelistResponseHeaders: [ 'content-type' ],
  blacklistRequestHeaders: [ 'authorization', 'cookie' ],
  blacklistResponseHeaders: [ 'set-cookie' ],
});
```

## Testing

Clone the repository and execute:

```bash
npm test
```

## Contribute

1. Fork it: `git clone https://github.com/softonic/@softonic/axios-logger.git`
2. Create your feature branch: `git checkout -b feature/my-new-feature`
3. Commit your changes: `git commit -am 'Added some feature'`
4. Check the build: `npm run build`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
npm package: @softonic/hapi-access-logger
Description: Hapi plugin to log all requests and responses
Author: Rubén Norte
Latest version: 5.0.0

# @softonic/hapi-access-logger

Hapi plugin to log finished requests and responses

## Installation

```bash
npm install @softonic/hapi-access-logger
```

## Usage

```js
import HapiAccessLogger from '@softonic/hapi-access-logger';

await server.register({
  plugin: HapiAccessLogger,
  options: {
    logger: bunyan.createLogger({ name: "myapp" }),
    // whitelistHeaders and blacklistHeaders should not be used together
    whitelistRequestHeaders: [ 'host', 'accept', 'content-type'  ],
    blacklistRequestHeaders: [ 'authorization' ],
    whitelistResponseHeaders: [ 'content-type' ],
    blacklistResponseHeaders: [ 'set-cookie' ],
    isLoggableRequest: request => get(request, 'route.settings.tags', []).includes('page')
  },
});
```

## Testing

Clone the repository and execute:

```bash
npm test
```

## Contribute

1. Fork it: `git clone https://github.com/softonic/hapi-access-logger.git`
2. Create your feature branch: `git checkout -b feature/my-new-feature`
3. Commit your changes: `git commit -am 'Added some feature'`
4. Check the build: `npm run build`
5. Push to the branch: `git push origin my-new-feature`
6. Submit a pull request :D
npm package: @softonic/hapi-axios-errors
Description: Hapi plugin to convert unhandled axios errors into boom errors
Author: Rubén Norte
Latest version: 3.0.0

# @softonic/hapi-axios-errors

Hapi plugin to convert unhandled axios errors into boom errors

## Installation

```bash
npm install @softonic/hapi-axios-errors
```

## Usage

```js
// CommonJS
// const HapiAxiosErrors = require('@softonic/hapi-axios-errors');

// ES2015
import HapiAxiosErrors from '@softonic/hapi-axios-errors';

server.register([
  HapiAxiosErrors
]);
```

## Testing

Clone the repository and execute:

```bash
npm test
```

## Contribute

1. Fork it: `git clone https://github.com/softonic/hapi-axios-errors.git`
2. Create your feature branch: `git checkout -b feature/my-new-feature`
3. Commit your changes: `git commit -am 'Added some feature'`
4. Check the build: `npm run build`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
npm package: @softonic/hapi-error-logger
Description: Hapi plugin to log errors on requests
Author: Rubén Norte
Latest version: 4.0.0

# @softonic/hapi-error-logger

Hapi plugin to log errors on requests

## Installation

```bash
npm install @softonic/hapi-error-logger
```

## Usage

```js
// CommonJS
// const HapiErrorLogger = require('@softonic/hapi-error-logger');

// ES2016
import HapiErrorLogger from '@softonic/hapi-error-logger';

await server.register({
  plugin: HapiErrorLogger,
  options: {
    logger: bunyan.createLogger({ name: 'myapp' }),
    // whitelistHeaders and blacklistHeaders should not be used together
    whitelistRequestHeaders: ['host', 'accept', 'content-type'],
    blacklistRequestHeaders: ['authorization'],
    isLoggableRequestError: error => error.output.statusCode >= 500
  }
});
```

## Testing

Clone the repository and execute:

```bash
npm test
```

## Contribute

1. Fork it: `git clone https://github.com/softonic/@softonic/hapi-error-logger.git`
2. Create your feature branch: `git checkout -b feature/my-new-feature`
3. Commit your changes: `git commit -am 'Added some feature'`
4. Check the build: `npm run build`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
npm package: @softonic/http-log-format
Description: Functions to transform native Node.js HTTP requests and responses to the Softonic HTTP log format
Author: Rubén Norte
Latest version: 2.0.0

# @softonic/http-log-format

Functions to transform native Node.js HTTP requests and responses to the Softonic HTTP log format

## Installation

```bash
npm install @softonic/http-log-format
```

## Usage

```js
// CommonJS
// const http = require('http');
// const {
//   formatRequest,
//   formatResponse,
//   stringifyRequest,
//   stringifyResponse,
// } = require('@softonic/http-log-format');

// ES2015
import http from 'http';
import {
  formatRequest,
  formatResponse,
  stringifyRequest,
  stringifyResponse,
} from '@softonic/http-log-format';

http.createServer((req, res) => {
  // send response...

  const formattedRequest = formatRequest(req, {
    // whitelist and blacklist should not be used together
    whitelistHeaders: ['accept', 'accept-language', 'host'],
    blacklistHeaders: ['cookie'],
  });
  const formattedResponse = formatResponse(res, {
    // whitelist and blacklist should not be used together
    whitelistHeaders: ['content-type', 'content-language', 'content-length'],
    blacklistHeaders: ['set-cookie'],
  });

  const message = `${stringifyRequest(req) ${stringifyResponse(res)}}`;

  // Some logger instance
  logger.info({
    request: formattedResponse,
    response: formattedResponse,
  }, message);
});

http.request(options, (res) => {
  // process response...

  const formattedRequest = formatRequest(res.req, {
    // whitelist and blacklist should not be used together
    whitelistHeaders: ['accept', 'accept-language', 'host'],
    blacklistHeaders: ['cookie'],
  });
  const formattedResponse = formatResponse(res, {
    // whitelist and blacklist should not be used together
    whitelistHeaders: ['content-type', 'content-language', 'content-length'],
    blacklistHeaders: ['set-cookie'],
  });

  const message = `${stringifyRequest(res.req) ${stringifyResponse(res)}}`;

  // Some logger instance
  logger.info({
    request: formattedResponse,
    response: formattedResponse,
  }, message);
});
```

## Testing

Clone the repository and execute:

```bash
npm test
```

## Contribute

1. Fork it: `git clone https://github.com/softonic/node-http-log-format.git`
2. Create your feature branch: `git checkout -b feature/my-new-feature`
3. Commit your changes: `git commit -am 'Added some feature'`
4. Check the build: `npm run build`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
npm package: @softonic/text-slug
Description: TextSlug is a set of helpers to convert text to semantic url separated by hyphens and vice versa.
Author: Miquel Roset
Latest version: 1.0.2

# TextSlug

TextSlug is a set of helpers to convert text to semantic url separated by hyphens and vice versa.

Active maintainer: [miquel.roset@softonic.com](mailto:miquel.roset@softonic.com?subject=TextSlug)

## Installation

### Node

```bash
npm install @softonic/text-slug
```

### Browser

The package is available as a UMD module: compatible with AMD, CommonJS and exposing a global variable `TextSlug` in `dist/TextSlug.js`.

It can be installed with npm...

```bash
npm install @softonic/text-slug
```

...or downloaded directly from Bitbucket:

https://bitbucket.org/softonic-development/text-slug

## Documentation

Is available in the `docs` folder after executing:

```bash
npm run doc
```

## Usage

```js
import { textToSlug, slugToText } from '@softonic/text-slug';

textToSlug('Some software by Softonic©!!!');
// return some-software-by-softonic

slugToText('some-software-by---softonic');
// return some software by softonic

```

## Testing

Clone the repository and execute:

```bash
npm test
```

## Contribute

1. Fork it: `git clone ssh://git@bitbucket.org:softonic-development/text-slug.git`
2. Create your feature branch: `git checkout -b feature/my-new-feature`
3. Commit your changes: `git commit -am 'Added some feature'`
4. Check the build: `npm run build`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D