open-index/open-npm huggingface dataset:
npm package: @5app/logger
Description: Simple logger used in 5app microservices
Author: 5app
Latest version: 2.3.1

# logger

> Simple console logger that outputs json in prod and pretty messages on dev

## Usage
```sh
npm install --save @5app/logger
```

```javascript
const logger = require('@5app/logger');

logger.info('An email was sent', {
  email: 'customer@5app.com',
  template: 'template1',
});

logger.error(new Error('Unknown playlist 123'));
```

## Options

The logger can optionally be customised using the following environment variables:

- `LOGS_FORMAT`: if set to `json`, the logger will log messages in json format instead of pretty messages (default behaviour).
- `LOGS_LEVEL`: minimum logging level, by default it will be `debug`. Accepted values are `'debug'`, `'info'`, `'warn'`, and `'error'`
- `TAG`: release tag (e.g. docker image tag) to be added to the log messages

## Logging levels

Logging levels are (from lower to higher priority): `'debug'`, `'info'`, `'warn'`, and `'error'`.
The logger provides the logging functions with the following signatures: `logger.<level>(message, objectOrError)`

Here is an example of how the logger can be used:
```javascript
logger.error('An error happened', new ApiError('The api call failed', 404)); // will log the message, the error message, the stack trace, and the statusCode error property
logger.warn('Be warned', {a: 1, b: Date.now(), c: 'some string'});
logger.info('An event happened', {a: 1, b: Date.now(), c: 'some string'});
logger.debug('A minor operation', {a: 1, b: Date.now(), c: 'some string'});
```

## Fetching context dynamically

In addition to providing a context object, you can also use `logger.addContext` to provide a function which will be called on every log to get a context object.

This can be helpful if you are using [async_hooks](https://nodejs.org/docs/latest/api/async_hooks.html) or [cls-hooked](https://www.npmjs.com/package/cls-hooked) to store request metadata similarly to thread-local storage.

For instance, you can do the following without having to explicitly pass the `correlationId` to each log:
```javascript
const asyncLocalStorage = new AsyncLocalStorage();

expressApp.use((req, res, next) {
  const correlationId = req.get('X-Correlation-Id') || uuidV4();
  asyncLocalStorage.run({correlationId}, () => next());
});

logger.addContext(() => asyncLocalStorage.getStore());
logger.info('User profile updated', {userId: 1234});
```

And the output will look like:
```json
{"level":"info","timestamp":"2021-02-23T17:55:43.011Z","correlationId":"12bf5b37-e0b8-56e0-8dcf-dc8c4aefc123","userId":1234}
```
npm package: @7polo/editorjs-paragraph
Description: Paragraph Tool for Editor.js
Author: CodeX
Latest version: 2.11.6

![](https://badgen.net/badge/Editor.js/v2.0/blue)

# Paragraph Tool for Editor.js

Basic text Tool for the [Editor.js](https://ifmo.su/editor).

## Installation

Get the package

```shell
yarn add @7polo/editorjs-paragraph
```

Include module at your application

```javascript
import Paragraph from '@7polo/editorjs-paragraph';
```

## Usage

The Paragraph tool is included at editor.js by default. So you don't need to connect it manually.
If you want to connect your customized version of this tool, do not forget to use the [`defaultBlock`](https://editorjs.io/configuration#change-the-default-block)
option of the editor config.

Add a new Tool to the `tools` property of the Editor.js initial config.

```javascript
var editor = new EditorJS({
  ...

  tools: {
    ...
    paragraph: {
      class: Paragraph,
      inlineToolbar: true,
    },
  }

  ...
});
```

## Config Params

The Paragraph Tool supports these configuration parameters:

| Field | Type     | Description        |
| ----- | -------- | ------------------ |
| placeholder | `string` | The placeholder. Will be shown only in the first paragraph when the whole editor is empty.  |
| preserveBlank | `boolean` | (default: `false`) Whether or not to keep blank paragraphs when saving editor data |

## Output data

| Field  | Type     | Description      |
| ------ | -------- | ---------------- |
| text   | `string` | paragraph's text |


```json
{
    "type" : "paragraph",
    "data" : {
        "text" : "Check out our projects on a <a href=\"https://github.com/codex-team\">GitHub page</a>.",
    }
}
```
npm package: @8btc/bbt-design
Description: a Web Design Language
Author: 8btc
Latest version: 0.2.24

# BBT Design Vue

A Web Design Language

### how to use ?

```js
import bbtDesign from '@8btc/bbt-design'
import '@8btc/bbt-design/dist/styles/index.css'

Vue.use(bbtDesign)
```

If you want to On-demand use?

```bash
yarn add babel-plugin-import --dev
```

Then edit .babelrc:

```
"plugins": [
  ["import", {
    "libraryName": "@8btc/bbt-design",
    "libraryDirectory": "src/components"
  }]
],
```

Then edit main.js

```js
import { Alert, Panel } from '@8btc/bbt-design'

Vue.component('bbt-alert', Alert)
Vue.component('bbt-panel', Panel)
```