open-index/open-npm huggingface dataset:
npm package: 2o3t-icon-font
Description: [Library] 2O3T-Icon-Font
Author: zyao89
Latest version: 0.0.26

# 2O3T IconFont

![](https://avatars1.githubusercontent.com/u/43493256?s=200&v=4)

## Documentation

Visit [2o3t.cn](https://2o3t.github.io/2o3t-ui).

## init

```js
import '2o3t-icon-font/dist/font-ot.css';
```
npm package: 2o3t-logger
Description: [Server Library] a simple Logger tools for Node.js
Author: Zyao89
Latest version: 0.3.9

# 2o3t-Logger

日志工具,可以打印日志

- 控制台输出

![控制台输出](https://raw.githubusercontent.com/2o3t/2o3t-Logger/master/captures/out.png)

- 文件输出

![文件输出](https://raw.githubusercontent.com/2o3t/2o3t-Logger/master/captures/file.png)

## Init

```js
    const Logger = require('2o3t-logger');
    const logger = Logger.instance('names', {
        disabledFile: true,
    });
    // or
    const logger = new Logger('names', {
        disabledFile: true, // 禁用文件输出
    });
```

## Usage

```js
     // @example:
     logger.debug('2o3t!');
     logger.info('2o3t!');
     logger.warn('2o3t!');
     logger.error('2o3t!');
     logger.fatal('2o3t!');
     logger.system('2o3t!');
     logger.test('2o3t!');

     // 以json格式进行打印
     logger.debug.json('2o3t!');
     logger.info.json('2o3t!');
     logger.warn.json('2o3t!');
     logger.error.json('2o3t!');
     logger.fatal.json('2o3t!');
     logger.system.json('2o3t!');
     logger.test.json('2o3t!');

     // 系统内部打印
     logger.system.debug('2o3t!');
     logger.system.info('2o3t!');
     logger.system.warn('2o3t!');
     logger.system.error('2o3t!');
     logger.system.fatal('2o3t!');
     logger.system.debug.json('2o3t!');
     logger.system.info.json('2o3t!');
     logger.system.warn.json('2o3t!');
     logger.system.error.json('2o3t!');
     logger.system.fatal.json('2o3t!');
```

### 全局 hook

通过全局重写 hooks 进行日志捕获.

``` js
Logger.hooks = function(name, args) {
 // do something
}
```

调用日志时, 需要使用 `hook` 才会进行捕获
```js
     logger.debug.hook('2o3t!');
     logger.info.hook('2o3t!');
     logger.warn.hook('2o3t!');
     logger.error.hook('2o3t!');
     logger.fatal.hook('2o3t!');
     logger.system.hook('2o3t!');
     logger.test.hook('2o3t!');
```

## 可控制输出

### For example

- 指定允许打印的模式:

```js
    process.env.LOGGER_ALLOW=*;   // 开启所有日志
    process.env.LOGGER_ALLOW=DEBUG,INFO;   // 只开启指定的日志模式
    process.env.LOGGER_ALLOW=NULL;  // 关闭所有日志
```

- 指定禁用打印的模式:

```js
    process.env.LOGGER_BAN=test; // 禁用的指定模式
    process.env.LOGGER_BAN=test,system; // 禁用的指定模式
    process.env.LOGGER_BAN=*; // 禁用所有
```

- 可指定文件存储路径进行配置(默认项目根路径):

```js
    process.env.LOGGER_ROOT=/a/b/c;   // 绝对路径
    // or
    process.env.LOGGER_ROOT=NULL; // 禁用文件输出
```

### !!! 重要: `system` 和 `test` 不会记录在文件日志中.
npm package: 2o3t-ui
Description: [Library] 2O3T-UI for Vue
Author: zyao89
Latest version: 0.1.16

# 2O3T-UI

[![](https://img.shields.io/npm/v/2o3t-ui.svg?style=flat)](https://www.npmjs.com/package/2o3t-ui)
![](https://img.shields.io/badge/language-javascript-blue.svg)
![](https://img.shields.io/npm/dt/2o3t-ui.svg)

[![](https://img.shields.io/badge/UIKit-@2o3t.cn-red.svg)](http://uikit.2o3t.cn)

![](https://avatars1.githubusercontent.com/u/43493256?s=200&v=4)

## Documentation

Visit [2o3t.cn](https://2o3t.github.io/2o3t-ui).

## init

```js
import '2o3t-icon-font/dist/font-ot.css';
import '2o3t-ui/libs/styles.css';
import OTUI from '2o3t-ui';

// 三方库
const hljs = require('highlight.js');
const markdownit = require('markdown-it');
const cheerio = require('cheerio');
const clipboard = require('clipboard-polyfill');
Vue.use(OTUI, {
    global: true,
    plugins: {
        markdownit,
        cheerio,
        clipboard,
        hljs,
    },
});
```

or 引入 CDN

```html
<script src="https://cdn.bootcss.com/highlight.js/9.13.1/highlight.min.js"></script>
<script src="https://cdn.bootcss.com/markdown-it/8.4.2/markdown-it.min.js"></script>
<script src="https://cdn.bootcss.com/clipboard-polyfill/3.0.0-beta3/clipboard-polyfill.promise.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
```

```js
import '2o3t-icon-font/dist/font-ot.css';
import '2o3t-ui/libs/styles.css';
import OTUI from '2o3t-ui';

Vue.use(OTUI, {
    global: true,
});
```
npm package: 2office-sms
Description: send sms use 2office service
Author: gaara
Latest version: 0.3.0

## Install
```
npm i 2office-sms --save
```

## Usage
```
const Office2 = require('../')

const office2 = new Office2({
  account: 'your_2office_account',
  password: 'your_2office_password',
  servivalKey: 'your_2office_key'
})

office2.sendSms('18902xxxxxx', 'message content', 'your_channel', new Date().getTime(), 1, function (err, result) {
  return done(err)
})
```

## Api

- sendSms
  send normal sms(text message)
- sendVoiceSms
  send voice sms(voice call)

## Test

modify `test/fixture.json`, and run `mocha`
npm package: 2pac
Description: A CLI utility to manage changelogs and semantic versioning.
Author: Vadim Galaktionov
Latest version: 1.0.0

# 2pac

2pac is a node.js CLI tool to simplify maintaining a changelog and bumping package.json version numbers.

## Installation

Install globally with `npm install -g 2pac`, or just use it with `npx 2pac`.

## Usage

```
➜ 2pac
Usage: 2pac [options][command]

Options:
    -V, --version   output the version number
    -h, --help      output usage information

Commands:
    add             Add a new changelog entry.
    generate        Generate the CHANGELOG.md and update the version number in the package.json.
    init            Initialize the .2pacrc.json and create changelog entries folder.
    import          Import an existing CHANGELOG.md file.
```

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License

[MIT](https://choosealicense.com/licenses/mit/)
npm package: 2pack
Description: Data serialization
Author: Daeren
Latest version: 1.0.0

* Binary (Little/Big - Endian)
* Relative and absolute zero-copy operations wherever possible
* Browser


#### Goals:
1. Low memory usage;
2. Maximum performance.


```javascript
const packer = require('2pack');

const header = packer('int16');
const payload = packer(['name:str', 'hp:int16']);

//------------------------------

payload.offset = header.maxSize;

//---------]>

const id = 69;
const data = { name: 'D', hp: 13 };

const buf = header.pack(id, payload.pack(data));
const size = buf.length;

//---------]>

console.log(packer.isBE, packer.isLE);

console.log(
    header.unpack(buf, 0, size),
    payload.unpack(buf, 0, size)
);

//------------------------------

/*
packer('int16'); // primitive | returns: value
pack(0);

packer(['int16']); // array | returns: array | unpackDataAsArray = true
pack([0]);

packer(['name:str']); // object | returns: object
pack(['D']);
pack({name: 'D'});

packer(['int16', 'name:str']); // error

//----)>

unpack(bin, offset, length, cbEndInfo(offset), target, asCopy, asArray);

@bin - Buffer / Uint8Array
*/
```


##### Packet type

| Name                | Alias   | Note                                                             |
|---------------------|---------|------------------------------------------------------------------|
|                     | -       |                                                                  |
| bin<size (byte)>    | b       | default: max 1024 (0-65535); server: Buffer; client: Uint8Array; |
| str<size (byte)>    | s       | default: max 256 (0-65535)                                       |
| int<size (bit)>     | i       | size: 8, 16, 32, 64 (BigInt64Array)                              |
| uint<size (bit)>    | u       | size: 8, 16, 32, 64 (BigUint64Array)                             |
| float<size (bit)>   | f       | size: 32, 64                                                     |
| json<size (byte)>   | j       | default: max 8192 (0-65535)                                      |


## License

MIT
npm package: 2pdf
Description: HTML to PDF command line tool
Author: Vidar Eldøy
Latest version: 0.2.6

# 2pdf

Command line tool for creating PDFs from HTML files.

Based on [puppeteer.](https://github.com/puppeteer/puppeteer)

### Install

```sh
npm i -g 2pdf
```

### Usage

```sh
2pdf input.html output.pdf
```

### Troubleshooting

On Debian systems you need these libraries installed:

```
apt install libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libasound2 libpangocairo-1.0-0 libxss1 libgtk-3-0
```

MIT Licensed. Enjoy!