open-index/open-npm huggingface dataset:
npm package: @2nthony/prettier-config
Description: My personal Prettier config
Author: 2nthony
Latest version: 2.0.2

# @2nthony/prettier-config

> My personal [Prettier](https://prettier.io/) config.

## Install

```bash
yarn add @2nthony/prettier-config --dev
```

## Usage

In `package.json`:

```json
{
  "prettier": "@2nthony/prettier-config"
}
```

## License

MIT.
npm package: @2o3t-core/plugin-common
Description: 2o3t-core 通用插件
Author: zyao89
Latest version: 0.0.65

# @2o3t-core/plugin-common

2o3t-core 通用插件

## usage

在config目录下创建 `plugin.default.js` 文件, 输入一下内容引用:

```js
module.exports = {
    mixins: [
        '@2o3t-core/plugin-common',
    ],
};
```
npm package: @2o3t-core/plugin-third-party
Description: 2o3t-core 第三方插件
Author: zyao89
Latest version: 0.0.10

# @2o3t-core/plugin-third-party

2o3t-core 第三方插件

## usage

在config目录下创建 `plugin.default.js` 文件, 输入一下内容引用:

```js
module.exports = {
    mixins: [
        '@2o3t-core/plugin-third-party',
    ],
};
```
npm package: @2o3t/electron-window-manager
Description: Convenience manager methods for Electron windows.
Author: zyao89
Latest version: 0.0.6

# @2o3t/electron-window-manager

## Installation

```sh
yarn add @2o3t/electron-window-manager
```

## Usage

in main process

```js
// in main process
const { app } = require('electron')
const path = require('path')
const wm = require('@2o3t/electron-window-manager')

app.on('ready', () => {
    const mainWindow = wm.createMainWindow({
        width: 1000, height: 400,
        url: path.resolve(__dirname, 'index.html'),
        args: {
            data: 'hi',
        },
        webPreferences: {
            preload: './preload.js',
        },
    });

    // or
    // const win = wm.createWindow({
    //     width: 1000, height: 400,
    //     url: path.resolve(__dirname, 'index.html'),
    //     args: {
    //         data: 'hi',
    //     },
    // });
});

```

you must create preload.js

```js
// preload.js
require('@2o3t/electron-window-manager').parseArgs();
```

in renderer process

```js
// in renderer process
console.log(__ARGS__);
```

## API

```js
const wm = require('@2o3t/electron-window-manager')

// return boolean
wm.hasMain();

// return main window
wm.getMain();

// add new window
wm.add(win);

// remove a window
wm.remove(win);

// destroy all
wm.destroy();


// return center size
wm.centerSize();

wm.screenBounds();

wm.screenWorkAreas();

wm.findWin(winID);

wm.all();

wm.allWithoutMain();

```
npm package: @2o3t/process-manager
Description: Process manager for Nodejs.
Author: zyao89
Latest version: 0.0.2

# @2o3t/process-manager

Process manager for Nodejs.

Ideas from https://github.com/Microsoft/vscode.

## Installation

```sh
npm install @2o3t/process-manager
```

or

```sh
yarn add @2o3t/process-manager
```

## Usage

**Client** (main process):

```js
const PM = require('@2o3t/process-manager');
const client = new PM.Client(__dirname + '/sub-processes.js');
const channel = client.getChannel('channelName');
channel.call('info', {
    // something
}).then(data => {
    console.log('data', data);
});
channel.listen('ccc')(aa => {
    console.log('listen..', aa);
});
```


**Server** (sub process):

```js
const PM = require('@2o3t/process-manager');
const server = new PM.Server();
const channel = new PM.ServerChannel({
    info(arg) {
        console.log('arg: ', arg);
        return Promise.resolve(server.info);
    },
    ccc(emit) {
        emit('100w');
        emit('101w');
        // server.dispose();
        emit('102w');
        emit('103w');
        emit('104w');
    },
});
console.log('server ok');
server.registerChannel('channelName', channel);
```

## Options

**`Client`** options in paramters

**modulePath**: file path of sub process

**options**: Object.

| key | type | desc |
|-----|-----|-----|
| **serverName** | string | A descriptive name for the server this connection is to. Used in logging. |
| **timeout**? | number | Time in millies before killing the ipc process. The next request after killing will start it again. |
| **args**? | string[] | Arguments to the module to execute. |
| **env**? | any | Environment key-value pairs to be passed to the process that gets spawned for the ipc. |
| **debug**? | number | Allows to assign a debug port for debugging the application executed. |
| **debugBrk**? | number | Allows to assign a debug port for debugging the application and breaking it on the first line. |
| **freshExecArgv**? | boolean | See https://github.com/Microsoft/vscode/issues/27665 <br> * Allows to pass in fresh execArgv to the forked process such that it doesn't inherit them from `process.execArgv`. <br> * e.g. Launching the extension host process with `--inspect-brk=xxx` and then forking a process from the extension host results in the forked process inheriting `--inspect-brk=xxx`. |
| **useQueue**? | boolean | Enables our createQueuedSender helper for this Client. Uses a queue when the internal Node.js queue is full of messages - see notes on that method. |



**`Server`** options in paramters

**options**: Object.

| key | type | desc |
|-----|-----|-----|
| **timeoutDelay**? | number | They will timeout after `timeoutDelay`. |


## License

MIT
npm package: @2pg/oauth
Description: Simply make Discord OAuth requests. Built with TypeScript, used by 2PG.
Author: theADAMJR
Latest version: 1.0.8
Deprecated: This package is no longer maintained. Please consider using alternatives.

# 2PG OAuth
Cloned from disco-oauth, but with TypeScript support, and less errors - [Docs](https://twopg.github.io/oauth).

[![Discord](https://img.shields.io/discord/685862664223850497?color=46828d&label=Support&style=for-the-badge)](https://discord.io/twopg)

**Full Examples**: [Demo](/tree/stable/demo), [2PG](https://github.com/twopg/Bot)

## 1 - Install
`npm i -S @2pg/oauth`

## 2 - Use

```js
import { Client } from '@2pg/oauth';

export default new Client({
  id: '533947001578979328',
  secret: '<your_bot_secret>',
  redirectURI: 'http://localhost:3000/auth',
  scopes: ['identify', 'guilds']
});
...
const key = await client.getAccess('<code_from_discord>');
...
const user = await client.getUser(key); // { id: '...', username: 'ADAMJR', ... }
const guilds = await client.getGuilds(key); // Collection<{ id: '...', name: '2PG', ... }>
```