open-index/open-npm huggingface dataset:
npm package: @pakastin/prefix
Description: CSS auto-prefix
Author: Juha Lindstedt
Latest version: 1.2.1

[![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?maxAge=3600&style=flat-square)](https://github.com/Flet/semistandard)
[![npm](https://img.shields.io/npm/v/@pakastin/prefix.svg?maxAge=60&style=flat-square)](https://www.npmjs.com/package/@pakastin/prefix)
[![Twitter Follow](https://img.shields.io/twitter/follow/pakastin.svg?style=social&maxAge=3600)](https://twitter.com/pakastin)

# prefix
CSS auto-prefix in < 0.5 KB (before GZIP)

## install

    npm install @pakastin/prefix
    
## usage

```js
import prefix from '@pakastin/prefix';

const TRANSFORM = prefix('transform');
const TRANSITION = prefix('transition');

const translate = (x, y) => `translate(${x}px, ${y}px)`;

const el = document.createElement('p');

el.style[TRANSITION] = `${TRANSFORM} .2s`;
el.style[TRANSFORM] = translate(100, 0);
```

## oldskool
```html
<script src="https://pakastin.github.io/prefix/prefix.min.js"></script>
<script>prefix(...)</script>
```

## License
[MIT](https://github.com/pakastin/prefix/blob/master/LICENSE)
npm package: @pake/baileys-store
Description: Minimal Baileys data storage for your favorite DBMS built with Prisma
Author: Royhan
Latest version: 0.1.5

# Baileys Store

Minimal Baileys data storage for your favorite DBMS built with Prisma. This library is a simple handler for Baileys event emitter that will listen and update your data in the database

## Requirements

- **Prisma** version **4.7.x** or higher
- **Baileys** version **5.x.x** or higher

## Supported Databases

- MySQL and PostgreSQL database should support the default schema out of the box
- For CockroachDB, you need to do this small change in the schema file

```diff prisma
model Session {
  pkId      BigInt    @id @default(autoincrement())
  sessionId String
  id        String
-  data      String @db.Text
+  data      String

  @@unique([sessionId, id], map: "unique_id_per_session_id_session")
  @@index([sessionId])
}
```

- For MongoDB, you need to follow [this convention](https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference?query=getdmff&page=1#mongodb-10) and update the `pkId` field. Then follow the previous CockroachDB guide
- SQLite and SQL Server database are not supported since they didn't support Prisma's `JSON` scalar type

## Installation

```bash
# Using npm
npm i @pake/baileys-store

# Using yarn
yarn add @pake/baileys-store
```

## Setup

Before you can actually use this library, you have to setup your database first

1. Copy the `.env.example` file from this repository or from the `node_modules` directory (should be located at `node_modules/@pake/baileys-store/.env.example`). Rename it into `.env` and then update your [connection url](https://www.prisma.io/docs/reference/database-reference/connection-urls) in the `DATABASE_URL` field
1. Copy the `prisma` directory from this repository or from the `node_modules` directory (should be located at `node_modules/@pake/baileys-store/prisma/`). Additionaly, you may want to update your `provider` in the `schema.prisma` file if you're not using MySQL database
1. Run your [migration](https://www.prisma.io/docs/reference/api-reference/command-reference#prisma-migrate)

## Usage

```ts
import pino from 'pino';
import makeWASocket from '@whiskeysockets/baileys';
import { PrismaClient } from '@prisma/client';
import { initStore, Store } from '@pake/baileys-store';

const logger = pino();
const socket = makeWASocket();
const prisma = new PrismaClient();

// You only need to run this once
initStore({
  prisma, // Prisma client instance
  logger, // Pino logger (Optional)
});

// Create a store and start listening to the events
const store = new Store('unique-session-id-here', socket.ev);

// That's it, you can now query from the prisma client without having to worry about handling the events
const messages = prisma.message.findMany();
```

## Contributing

PRs, issues, suggestions, etc are welcome. Please kindly open a new issue to discuss it
npm package: @pake/close-with-grace
Description: Exit your process, gracefully (if possible)
Author: Matteo Collina
Latest version: 1.3.2

# close-with-grace

Exit your process, gracefully (if possible) - for Node.js

## Install

```
npm i close-with-grace
```

## Usage

```js
const closeWithGrace = require('close-with-grace')

// delay is the number of milliseconds for the graceful close to
// finish.
closeWithGrace({ delay: 500 }, async function ({ signal, err, manual }) {
  if (err) {
    console.error(err)
  }
  await closeYourServer()
})
```

### Injecting custom logger

```js
const closeWithGrace = require('close-with-grace')

// delay is the number of milliseconds for the graceful close to
// finish.
closeWithGrace(
  {
    delay: 500,
    logger: { error: (m) => console.error(`[close-with-grace] ${m}`) }
  },
  async function ({ signal, err, manual }) {
  if (err) {
    console.error(err)
  }
  await closeYourServer()
})
```

## API

### `closeWithGrace([opts], fn({ err, signal, manual }))`

`closeWithGrace` adds a global listeners to the events:

* `process.once('SIGTERM')`
* `process.once('SIGINT')`
* `process.once('uncaughtException')`
* `process.once('unhandledRejection')`

In case one of them is emitted, it will call the given function.
If it is emitted again, it will terminate the process abruptly.

#### opts

* `delay`: the numbers of milliseconds before abruptly close the
  process. Default: `10000`.

* `logger`: instance of logger which will be used internally. Default: `console`.

#### fn({ err, signal, manual } [, cb])

Execute the given function to perform a graceful close.
The function can either return a `Promise` or call the callback.
If this function does not error, the process will be closed with
exit code `0`.
If the function rejects with an `Error`, or call the callback with an
`Error` as first argument, the process will be closed with exit code
`1`.

#### return values

Calling `closeWithGrace()` will return an object as formed:

* `close()`: close the process, the `manual` argument will be set to
  true.
* `uninstall()`: remove all global listeners.

## License

MIT