open-index/open-npm huggingface dataset:
npm package: @imhele/radix
Description: [![NPM version](https://img.shields.io/npm/v/@imhele/radix.svg?style=flat)](https://npmjs.org/package/@imhele/radix) [![NPM downloads](http://img.shields.io/npm/dm/@imhele/radix.svg?style=flat)](https://npmjs.org/package/@imhele/radix) [![Build Status](ht
Latest version: 2.0.0

# radix

[![NPM version](https://img.shields.io/npm/v/@imhele/radix.svg?style=flat)](https://npmjs.org/package/@imhele/radix)
[![NPM downloads](http://img.shields.io/npm/dm/@imhele/radix.svg?style=flat)](https://npmjs.org/package/@imhele/radix)
[![Build Status](https://travis-ci.com/imhele/radix.svg?branch=master)](https://travis-ci.com/imhele/radix)
[![Coverage Status](https://coveralls.io/repos/github/imhele/radix/badge.svg?branch=master)](https://coveralls.io/github/imhele/radix?branch=master)
[![License](https://img.shields.io/npm/l/@imhele/radix.svg)](https://npmjs.org/package/@imhele/radix)

## Install

```sh
$ npm install @imhele/radix --save
or
$ yarn add @imhele/radix
```

## Exmaple

```js
import changeRadix from '@imhele/radix';

changeRadix('2', { fromRadix: 10, toRadix: 2 });
// '10'
changeRadix('FFFF', { fromRadix: 16, toRadix: 32 });
// '1VVV'
changeRadix(12345678, { fromRadix: 10 });
// 'pnfq'
changeRadix('12345678', { fromRadix: 10, toCharMap: '0123456789abcdef' });
// 'bc614e'
```

## Throw error

Does not suport decimal.

```js
changeRadix(1.2);
// ERROR:
// [radix] The input message `1.1` include the char `.`
// that does not exist in char map `0123456789abcde...`

changeRadix(2, { toRadix: 1 });
changeRadix(2, { toRadix: 2.2 });
changeRadix(2, { toRadix: 100, toCharMap: '01' });
// ERROR:
// [radix] The radix must be an integer between `2`
// and `charMap.length (62)`, but got `1`
```
npm package: @imhelper/onebot-v11
Description: OneBot V11 协议客户端 SDK
Author: 凉菜
Latest version: 1.0.4

# @imhelper/onebot-v11

OneBot V11 协议客户端 SDK，提供快速连接和消息收发功能。

## 功能特性

- ✅ HTTP API 调用（发送消息、获取信息等）
- ✅ WebSocket 事件接收
- ✅ Webhook 事件接收
- ✅ SSE 事件接收（浏览器环境）
- ✅ 自动重连机制
- ✅ TypeScript 支持

## 安装

```bash
npm install @imhelper/onebot-v11
# 或
pnpm add @imhelper/onebot-v11
```

## 使用示例

### WebSocket 模式（推荐）

```typescript
import { OneBotV11Client } from '@imhelper/onebot-v11';

const client = new OneBotV11Client({
  baseUrl: 'http://localhost:6727',
  platform: 'kook',
  accountId: 'zhin',
  accessToken: 'your_token',
  receiveMode: 'websocket', // 默认
});

// 监听事件
client.onEvent((event) => {
  if (event.post_type === 'message') {
    console.log('收到消息:', event);
  }
});

// 连接
await client.connect();

// 发送私聊消息
await client.sendPrivateMsg(123456, 'Hello!');

// 发送群消息
await client.sendGroupMsg(789012, 'Hello Group!');
```

### Webhook 模式

```typescript
const client = new OneBotV11Client({
  baseUrl: 'http://localhost:6727',
  platform: 'kook',
  accountId: 'zhin',
  receiveMode: 'webhook',
  webhookPort: 8080, // Webhook 服务器端口
});

await client.connect();
// 现在客户端会在 http://localhost:8080/onebot/v11 接收事件
```

### SSE 模式（浏览器环境）

```typescript
const client = new OneBotV11Client({
  baseUrl: 'http://localhost:6727',
  platform: 'kook',
  accountId: 'zhin',
  receiveMode: 'sse',
});

await client.connect();
```

## API

### 构造函数

```typescript
new OneBotV11Client(config: OneBotV11ClientConfig)
```

### 配置选项

- `baseUrl`: 服务器地址（必需）
- `platform`: 平台标识（必需）
- `accountId`: 账号ID（必需）
- `accessToken`: 访问令牌（可选）
- `receiveMode`: 接收方式，可选值：`'websocket'` | `'webhook'` | `'sse'`（默认：`'websocket'`）
- `webhookUrl`: Webhook 接收地址（webhook 模式）
- `webhookPort`: Webhook 端口（webhook 模式，默认：8080）

### 方法

#### 连接和断开

- `connect()`: 连接并开始接收事件
- `disconnect()`: 断开连接
- `onEvent(handler)`: 监听事件

#### 消息 API

- `sendPrivateMsg(userId, message)`: 发送私聊消息
- `sendGroupMsg(groupId, message)`: 发送群消息
- `deleteMsg(messageId)`: 撤回消息
- `getMsg(messageId)`: 获取消息

#### 用户和群组 API

- `getLoginInfo()`: 获取登录信息
- `getUserInfo(userId, noCache?)`: 获取用户信息
- `getFriendList()`: 获取好友列表
- `getGroupInfo(groupId, noCache?)`: 获取群信息
- `getGroupList()`: 获取群列表
- `getGroupMemberInfo(groupId, userId, noCache?)`: 获取群成员信息
- `getGroupMemberList(groupId)`: 获取群成员列表

#### 自定义 API

- `call(action, params?)`: 调用自定义 API

## 事件类型

事件对象遵循 OneBot V11 标准：

```typescript
interface OneBotV11Event {
  post_type: 'message' | 'notice' | 'request' | 'meta_event';
  message_type?: 'private' | 'group';
  time: number;
  self_id: number;
  // ... 其他字段
}
```

## License

MIT
npm package: @imho/cache
Description: [![npm](https://img.shields.io/npm/v/@imho/cache)](https://www.npmjs.com/package/@imho/cache)
Author: Alberto Villa
Latest version: 0.9.0

# @imho/cache

[![npm](https://img.shields.io/npm/v/@imho/cache)](https://www.npmjs.com/package/@imho/cache)
npm package: @imho/clock
Description: [![npm](https://img.shields.io/npm/v/@imho/clock)](https://www.npmjs.com/package/@imho/clock)
Author: Alberto Villa
Latest version: 0.6.0

# @imho/clock

[![npm](https://img.shields.io/npm/v/@imho/clock)](https://www.npmjs.com/package/@imho/clock)
npm package: @imho/codec
Description: [![npm](https://img.shields.io/npm/v/@imho/codec)](https://www.npmjs.com/package/@imho/codec)
Author: Alberto Villa
Latest version: 0.7.2

# @imho/codec

[![npm](https://img.shields.io/npm/v/@imho/codec)](https://www.npmjs.com/package/@imho/codec)
npm package: @imho/codec-io-ts
Description: [![npm](https://img.shields.io/npm/v/@imho/codec-io-ts)](https://www.npmjs.com/package/@imho/codec-io-ts)
Author: Alberto Villa
Latest version: 0.8.0

# @imho/codec-io-ts

[![npm](https://img.shields.io/npm/v/@imho/codec-io-ts)](https://www.npmjs.com/package/@imho/codec-io-ts)
npm package: @imho/codec-zod
Description: [![npm](https://img.shields.io/npm/v/@imho/codec-zod)](https://www.npmjs.com/package/@imho/codec-zod)
Author: Alberto Villa
Latest version: 0.4.0

# @imho/codec-zod

[![npm](https://img.shields.io/npm/v/@imho/codec-zod)](https://www.npmjs.com/package/@imho/codec-zod)
npm package: @imho/log
Description: [![npm](https://img.shields.io/npm/v/@imho/log)](https://www.npmjs.com/package/@imho/log)
Author: Alberto Villa
Latest version: 0.8.0

# @imho/log

[![npm](https://img.shields.io/npm/v/@imho/log)](https://www.npmjs.com/package/@imho/log)
npm package: @imho/log-pino
Description: [![npm](https://img.shields.io/npm/v/@imho/log-pino)](https://www.npmjs.com/package/@imho/log-pino)
Author: Alberto Villa
Latest version: 0.7.2

# @imho/log-pino

[![npm](https://img.shields.io/npm/v/@imho/log-pino)](https://www.npmjs.com/package/@imho/log-pino)
npm package: @imhoff/colors
Description: Color manipulation library.
Author: Dan Imhoff
Latest version: 1.0.0

# Color Library

MIT-licensed color manipulation library. Originally plucked from Material UI ([`colorManipulator.js@a194311a6b`](https://github.com/mui-org/material-ui/blob/a194311a6b6bd3f27b726c06ebe738ee445893b9/packages/material-ui/src/styles/colorManipulator.js)).
npm package: @imhoff/eslint-config
Description: My personal ESLint config.
Author: Dan Imhoff
Latest version: 4.0.5

# @imhoff/eslint-config

My personal ESLint config.

This is meant to be used alongside Prettier (with
[`@imhoff/prettier-config`](https://github.com/imhoffd/prettier-config/)).

## Usage

1. Remove existing `.eslintrc.*` file, if present.
1. Install `eslint` and the config.

   ```
   npm install -D eslint @imhoff/eslint-config
   ```

1. Add the following to `package.json`:

   ```json
   "eslintConfig": {
     "extends": "@imhoff/eslint-config/recommended"
   },
   ```

:memo: You can also use the base rule set: `@imhoff/eslint-config`

### With Prettier and `@imhoff/prettier-config`

1. Set up Prettier and
   [`@imhoff/prettier-config`](https://github.com/imhoffd/prettier-config/).
1. When using with Prettier and `@imhoff/prettier-config`, ESLint should run
   first. Set up your scripts in `package.json` like this:

   ```json
     "scripts": {
       "lint": "npm run eslint && npm run prettier -- --check",
       "fmt": "npm run eslint -- --fix && npm run prettier -- --write",
       "prettier": "prettier \"**/*.ts\"",
       "eslint": "eslint . --ext .ts",
     }
   ```

   - `npm run lint`: for checking if ESLint and Prettier complain
   - `npm run fmt`: attempt to autofix lint issues and autoformat code

   :memo: Not every rule in this configuration is autofixable, so `npm run fmt`
   may continue failing until lint issues are addressed manually.

### With Captain Hook

1. Install [captainhook](https://github.com/imhoffd/captainhook):

   ```
   npm install -D captainhook
   ```

1. Add the following to `package.json`:

   ```json
   "hooks": {
     "pre-commit": "npm run lint"
   },
   ```
npm package: @imhoff/google-fonts-downloader
Description: Specify a Google Fonts Stylesheet URL and get a directory of font assets.
Author: Daniel Imhoff
Latest version: 0.2.0

# @imhoff/google-fonts-downloader

Download Google fonts by providing the URL. Useful if you want to host your
fonts on your own server.

This tool creates a directory with the downloaded fonts and then generates a
font face file for you in either CSS or
[Vanilla Extract](https://vanilla-extract.style) format.

## Usage

```
npx @imhoff/google-fonts-downloader --help
npx @imhoff/google-fonts-downloader <url> [options]
```

## Example

```
npx @imhoff/google-fonts-downloader \
  "https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" \
  --output vanilla-extract \
  --url-prefix "/public/fonts/"
```
npm package: @imhoff/prettier-config
Description: My personal Prettier config.
Author: Dan Imhoff
Latest version: 2.2.0

# @imhoff/prettier-config

My personal Prettier config.

## Usage

Usage is based on [Sharing configurations](https://prettier.io/docs/en/configuration.html#sharing-configurations) from the Prettier docs.

1. Remove existing `.prettierrc` file, if present.
1. Install the config.

    ```
    npm install -D @imhoff/prettier-config
    ```

1. Add the following to `package.json`:

    ```
    "prettier": "@imhoff/prettier-config",
    ```
npm package: @imhonglu/pattern-builder
Description: Type-safe regular expression pattern builder for TypeScript with fluent API
Author: imhonglu
Latest version: 1.0.5

# @imhonglu/pattern-builder

[English](./README.md) | [한국어](./README_KR.md)

## Introduction

- A RegExp builder library that can be used without dependencies.
- All patterns are converted to regular expressions through the `toRegExp` method.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [API Reference](#api-reference)

## Installation

```bash
npm install @imhonglu/pattern-builder
```

## Usage

Here's an example of creating a `userinfo` pattern from URI Spec.

For detailed usage, please refer to the [API Reference](#api-reference).

```ts
// constants.ts
import { characterSet, concat, hexDigit } from "@imhonglu/pattern-builder";

// pct-encoded = "%" HEXDIG HEXDIG
export const pctEncoded = concat(
	"%",
	hexDigit.clone().exact(2),
);

// unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
export const unreserved = characterSet(
	alpha,
	digit,
	/[\-._~]/,
);

// sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
//            / "*" / "+" / "," / ";" / "="
export const subDelims = characterSet(/[!$&'()*+,;=]/);
```

```ts
// userinfo.ts
import { oneOf, characterSet } from "@imhonglu/pattern-builder";
import { pctEncoded, subDelims, unreserved } from "./constants.js";

const pattern = oneOf(pctEncoded, characterSet(unreserved, subDelims, ":"))
		.nonCapturingGroup()
		.oneOrMore()
	.anchor()
	.toRegExp();

console.log(pattern.test("user:pass")); // true
console.log(pattern.test("@")); // false
console.log(pattern.test("@:@")); // false
```

## API Reference

### Pattern Functions

- [characterSet](./docs/pattern-builder.characterset.md) - Create character set
- [concat](./docs/pattern-builder.concat.md) - Concatenate strings
- [oneOf](./docs/pattern-builder.oneof.md) - Select one of multiple patterns

### Pre-defined Patterns

- [alpha](./docs/pattern-builder.alpha.md) - `/[a-zA-Z]/`
- [digit](./docs/pattern-builder.digit.md) - `/[\d]/`
- [hexDigit](./docs/pattern-builder.hexdigit.md) - `/[\da-fA-F]/`

### Pattern Builder Classes

- [PatternBuilder](./docs/pattern-builder.patternbuilder.md) - Base Builder class
- [Characters](./docs/pattern-builder.characters.md) - Builder class for creating character sets
npm package: @imhonglu/type-guard
Description: TypeScript type guard utilities providing runtime type checking and validation with zero dependencies
Author: imhonglu
Latest version: 1.0.2

# @imhonglu/type-guard

[English](./README.md) | [한국어](./README_KR.md)

## Introduction

- A library providing zero dependencies type guard utilities.
- Provides a chaining API inspired by Jest's matcher pattern.
- Built on `Proxy` to minimize overhead and ensure type safety.

![demo-1](./assets/demo-1.png)

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [API Reference](#api-reference)

## Installation

```bash
npm install @imhonglu/type-guard
```

## Usage

Type guards created using the `composeGuards` function can be negated using the `not` key.

For detailed usage examples, please refer to the [API Reference](#api-reference).

```ts
import { composeGuards } from '@imhonglu/type-guard';

// Composing type guards
const has = composeGuards({
	length: (value: unknown): value is object & { length: number } =>
		typeof value === "object" && value !== null && "length" in value,
});
// {
//   length: [Function];
//   not: {
//     length: [Function];
//   };
// }

let value: unknown[] | number | undefined;

if (has.length(value)) { ... } // value is unknown[]
if (has.not.length(value)) { ... } // value is number | undefined
```

## API Reference

- [composeGuards](./docs/type-guard.composeguards.md) - compose type guards
- [negateGuards](./docs/type-guard.negateguards.md) - negate type guards
- [negateGuard](./docs/type-guard.negateguard.md) - negate single type guard
npm package: @imhonglu/type-object
Description: Type-safe wrapper for JavaScript Object API with zero external dependencies
Author: imhonglu
Latest version: 1.0.2

# @imhonglu/type-object

[English](./README.md) | [한국어](./README_KR.md)

## Introduction

- Provides a dependency-free type-safe wrapper for [Object API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
- Provides types that closely match native behavior
- Supported APIs
  - `Object.keys`
  - `Object.entries`
  - `Object.fromEntries`
  - `Object.hasOwn`

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [API Reference](#api-reference)

## Installation

```bash
npm install @imhonglu/type-object
```

## Usage

For detailed examples, please refer to the [API Reference](#api-reference).

```ts
import * as TypeObject from '@imhonglu/type-object';

const data = { a: 1, b: 2, c: 3 };

for (const key of TypeObject.keys(data)) {
  // key: "a" | "b" | "c"
  console.log(data[key]); // number
}
```

```ts
import * as TypeObject from '@imhonglu/type-object';

const string = 'hello';

for (const index of TypeObject.keys(string)) {
  // index: number & keyof string
  console.log(string[index]); // string
}
```

```ts
import * as TypeObject from '@imhonglu/type-object';

const data: unknown = { name: 'John' };

if (TypeObject.hasOwn(data, 'name')) {
  // data: unknown & { name: unknown }
  console.log(data.name);
}
```

## API Reference

- [keys](./docs/type-object.keys.md) - `Object.keys` wrapper
- [entries](./docs/type-object.entries.md) - `Object.entries` wrapper
- [fromEntries](./docs/type-object.fromEntries.md) - `Object.fromEntries` wrapper
- [hasOwn](./docs/type-object.hasOwn.md) - `Object.hasOwn` wrapper