open-index/open-npm huggingface dataset:
npm package: @symphco/logger
Description: ## Install
Latest version: 0.0.3

# logger

## Install

Run `npm i @symphco/logger` to install the library.

## Usage

1. Import `LoggerService` and `centralizedLoggerMiddleware` in your app.module.ts file.
```
import { LoggerService, centralizedLoggerMiddleware } from '@symphco/logger';
```

2. Inside AppModule class, add the following:
```
export class AppModule {
    async configure(consumer: MiddlewareConsumer) {
        consumer.apply(
            await LoggerService.generateMiddleware(process.env.NODE_ENV !== 'development',),
            centralizedLoggerMiddleware
        ).forRoutes('*');
    }
}
```

3. In any service file where Logger will be used, import LoggerService and create an instance of it.
For example:

```
export class RequestService {
  private loggerService: LoggerService;
    constructor() {
      this.loggerService = new LoggerService('Request Service');
    }
}
```
4. You can now use the Logger service’s methods when applicable. For example:

For errors:

`this.loggerService.error('findAll', error.message);`

For info:

`this.loggerService.info('getFindRequestsQuery', params, user);`
npm package: @symphco/nx-utils
Description: This library was generated with [Nx](https://nx.dev).
Latest version: 0.0.8

# nx-utils

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test nx-utils` to execute the unit tests via [Jest](https://jestjs.io).

## Running lint

Run `nx lint nx-utils` to execute the lint via [ESLint](https://eslint.org/).
npm package: @symplify.com/webpush-react
Description: ## Install
Latest version: 0.0.1

# Symplify Web Push for React

## Install

```shell
npm install @symplify.com/webpush-react
```
or
```shell
yarn add @symplify.com/webpush-react
```

## API

Types:
```typescript
interface Message {
  id: string;
  userId: string;
  hasBeenRead: boolean;
  subject: string;
  body?: string;
  loadBody: () => void;
  deleteMessage: () => void;
  markRead: () => void;
}
```

Hooks: 
#### `useWebPush(userHash: string | null): void`
Initiate Symplify Web Push. Use hook in a component rendered on all pages.

#### `useMessages(): Message[]`
Get a list of all web push messages. Will rerender when new messages becomes available.

#### `useNewMessage(): Message`
Listen for new incoming messages. For instance when focus is returned to the browser window and
new messages has been sent while away, this hook will rerender with the new message. This messages
will always contain the message body.