open-index/open-npm huggingface dataset:
npm package: @mznjs/helper
Description: JavaScript 函数库、工具类
Author: supbose
Latest version: 3.1.0

# 文档采用`Deepseek`AI大模型自动生成的，仅供参考。

根据提供的 `index.d.cts` 文件内容，以下是生成的使用文档：

---

### **@mznjs/helper 工具库使用文档**

#### **1. 核心模块概览**

```typescript
export { db, storage, utils } // 主要导出内容
export { lib, stdEnv, unstorage } // 扩展工具库
```

---

#### **2. 存储模块 (storage)**

##### **2.1 本地存储操作**

```typescript
import { storage } from '@mznjs/helper'

// 设置数据
storage.set('theme', 'dark')

// 获取数据
const theme = storage.get('theme') // 'dark'

// 删除数据
storage.remove('theme')
```

##### **2.2 数据库操作 (unstorage)**

```typescript
import { db } from '@mznjs/helper'

// 设置键值
await db.setItem('cache:data', { timestamp: Date.now() })

// 获取键值
const data = await db.getItem('cache:data')

// 删除键值
await db.removeItem('cache:data')
```

---

#### **3. 实用工具 (utils)**

##### **3.1 Favicon 获取工具**

```typescript
import { utils } from '@mznjs/helper'

// 创建实例
const fetcher = new utils.fav.FaviconFetcher('https://example.com')

// 获取 favicon URL
const url = await fetcher.getFaviconUrl()

// 获取二进制数据
const blob = await fetcher.fetchFavicon()

// 加载为图像
const img = await fetcher.loadFaviconAsImage()
```

##### **3.2 数据验证工具**

```typescript
import { utils } from '@mznjs/helper'

// 手机号验证
utils.testValidate('13800138000', 'mobile') // true

// 邮箱验证
utils.testValidate('test@example.com', 'email') // true

// 支持的全部验证类型：
type ValidationType =
  | 'version' // 版本号 (x.y.z)
  | 'mobile' // 手机号
  | 'email' // 邮箱
  | 'ip' // IP地址
  | 'url' // URL
  | 'datetime' // 日期时间 (YYYY-MM-DD HH:mm:ss)
  | 'english+number' // 英文+数字组合
  | 'chinese' // 纯中文
  // ...共 25 种验证类型
```

##### **3.3 URL 处理工具**

```typescript
import { utils } from '@mznjs/helper'

// URL 解析
const parsed = utils.url.parseUrlWithRegex('https://example.com:8080/path')
/* 返回：
{
  protocol: 'https',
  hostname: 'example.com',
  port: '8080',
  path: '/path'
}
*/

// 强制转换为 HTTP
utils.url.http('ftp://example.com') // 'http://example.com'
```

---

#### **4. 扩展工具库**

```typescript
// 存储增强库 (unstorage)
import { unstorage } from '@mznjs/helper'

// 基础工具库 (@mznjs/library)
import { lib } from '@mznjs/helper'

// 环境检测库 (std-env)
import { stdEnv } from '@mznjs/helper'
lib.crypto.randomUUID()
console.log(stdEnv.isBrowser)
```

---

#### **5. 类型定义**

所有工具均包含完整的 TypeScript 类型定义，支持以下功能：

- 方法参数类型提示
- 返回值类型推断
- 枚举类型自动补全（如 `ValidationType`）
- 类方法智能提示

---

### **典型应用场景**

1. **前端缓存管理**：结合 `storage` 和 `db` 实现多级缓存
2. **表单验证**：使用 `testValidate` 进行实时输入校验
3. **爬虫开发**：利用 `FaviconFetcher` 获取网站图标
4. **URL 标准化**：通过 `url` 工具处理第三方链接
5. **环境适配**：配合 `stdEnv` 实现跨平台兼容逻辑

---

完整类型定义可参考 `index.d.cts` 文件，所有接口均包含中文注释说明。
npm package: @mznjs/mbump
Description: ``` shell mbump ``` ## ❤️ 鸣谢
Author: whitekite
Latest version: 1.0.6


``` shell
mbump
```
## ❤️ 鸣谢

[bumpp](https://github.com/antfu/bumpp)

[changelogen](https://github.com/unjs/changelogen)

[vbumpp](https://gitee.com/vill-v/bumpp)
## License

[MIT](./LICENSE)
npm package: @mznjs/tsconfig
Description: @mznjs/tsconfig 属于自用的 TypeScript 配置文件
Latest version: 1.0.1

# @mznjs/tsconfig   


Base tsconfig file for mznjs project

## Install

```shell
npm i --save-dev @mznjs/tsconfig
```
```shell
yarn add --dev @mznjs/tsconfig
```
```shell
pnpm add --dev @mznjs/tsconfig
```

## Usage

```json
// tsconfig.json
{
  "extends": "@mznjs/tsconfig",
  // custom config
  "compilerOptions": {
    // override @mznjs/tsconfig options here
  }
}
```

## License

[MIT](LICENSE)
npm package: @mzvast/vrxd
Description: This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app) and [StoryBook](https://github.com/storybooks/storybook). Build with [Rollup](https://github.com/rollup/rollup) and [Babel 7](https://github.com/babel/bab
Author: mzvast
Latest version: 0.0.1

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app) and [StoryBook](https://github.com/storybooks/storybook).
Build with [Rollup](https://github.com/rollup/rollup) and [Babel 7](https://github.com/babel/babel)

## Available Scripts

TODO:
npm package: @mzvonar/defer-render-hoc
Description: React defer render HOC
Latest version: 0.4.0

## defer-render-hoc

Forked from [https://github.com/hanford/defer-render-hoc](https://github.com/hanford/defer-render-hoc).

Added WaitingComponent argument, so you can display some kind of loader while waiting for render.
Added option to disable functionality for SSR.

Defer expensive react rendering with [rAF](https://www.npmjs.com/package/raf)

<br />

## Install

```
$ npm install @mzvonar/defer-render-hoc --save
```

## Usage

```js
import React, { Component } from 'react'
import deferRender from '@mzvonar/defer-render-hoc'

class RandomComp extends Component {
  ...

  render () {
    const { scroll } = this.props

    ...
  }
}

export default deferRender(RandomComp)
```

### SSR
You can use third parameter isEnabled to disable this component. Either pass boolean value or a function that returns boolean.

```js
export default deferRender(RandomComp, null, canUseDom())
```

## Demo
See this [CodeSandbox for a demo](https://codesandbox.io/s/pjxkjjxv8m).

MIT © [Jack Hanford](http://jackhanford.com)
npm package: @mzvonar/deletein
Description: Deletes value in object according to provided path and returns copy of object
Author: Martin Zvonar
Latest version: 0.0.7

deleteIn [![Build Status](https://travis-ci.org/mzvonar/deleteIn.svg?branch=master)](https://travis-ci.org/mzvonar/deleteIn) [![Coverage Status](https://coveralls.io/repos/github/mzvonar/deleteIn/badge.svg?branch=master)](https://coveralls.io/github/mzvonar/deleteIn?branch=master) [![npm version](https://badge.fury.io/js/%40mzvonar%2Fdeletein.svg)](https://badge.fury.io/js/%40mzvonar%2Fdeletein)
=========

Deletes value from object by path. Path can be string or array (e.g. ['user', 'profile', 'gender']).  
Always returns new copy of object.

## Installation

  `npm install @mzvonar/deletein`

## Parameters
```javascript
deleteIn(context, path);
```

| Name | Description |
| - | - |
| ```context``` | Object from which the value deleted |
| ```path``` | Must be Array or String. See usage |

## Usage

```javascript
import deleteIn from '@mzvonar/deletein';
  
const context = {
    user: {
        profile: {
            gender: 'female'
        },
        ids: [1, 2, 3]
    }
};
  
const newContext = deleteIn(context, ['user', 'profile', 'gender']);
 ```
 
  returns:
```javascript  
    {
        user: {
            profile: {}
        }
    }
``` 

```javascript  
const newContext = deleteIn(context, ['user', 'ids', 1]);
 ```
 
  returns:
```javascript  
    {
        user: {
            profile: {
                gender: 'female',
                ids: [1, 3]
            }
        }
    }
``` 

## mutableDeleteIn
If you need you can import mutableDeleteIn, which is exactly the same as deleteIn, but mutates the original context object without creating copy.


## Tests

  `npm test`
npm package: @mzvonar/getin
Description: Get value from object by path. Undefined-safe and accepts default value
Author: Martin Zvonar
Latest version: 0.0.11

getIn [![Build Status](https://travis-ci.org/mzvonar/getIn.svg?branch=master)](https://travis-ci.org/mzvonar/getIn) [![Coverage Status](https://coveralls.io/repos/github/mzvonar/getIn/badge.svg?branch=master)](https://coveralls.io/github/mzvonar/getIn?branch=master) [![npm version](https://badge.fury.io/js/%40mzvonar%2Fgetin.svg)](https://badge.fury.io/js/%40mzvonar%2Fgetin)
=========

Get value from object by path. Path can be string or array (e.g. ['user', 'profile', 'gender']).  
If any value in path is undefined then undefined is returned or defaultValue if provided.

## Installation

  `npm install @mzvonar/getin`

## Usage

```javascript
const getIn = require('@mzvonar/getin');
  
const context = {
    user: {
        profile: {
            gender: 'female'
        }
    }
};
  
const gender = getIn(context, ['user', 'profile', 'gender']);
 ```
 
  gender is `female`

```javascript  
const country = getIn(context, ['user', 'address', 'country']);
 ```
  
  country is `undefined`
  
```javascript  
const verified = getIn(context, ['user', 'profile', 'verified'], false);
```
    
  verified is `false`

## Tests

  `npm test`
npm package: @mzvonar/mergein
Description: Merge new object with value at provided path in context object
Author: Martin Zvonar
Latest version: 0.1.7

mergeIn [![Build Status](https://travis-ci.org/mzvonar/mergeIn.svg?branch=master)](https://travis-ci.org/mzvonar/mergeIn) [![Coverage Status](https://coveralls.io/repos/github/mzvonar/mergeIn/badge.svg?branch=master)](https://coveralls.io/github/mzvonar/mergeIn?branch=master) [![npm version](https://badge.fury.io/js/%40mzvonar%2Fmergein.svg)](https://badge.fury.io/js/%40mzvonar%2Fmergein)
=========

Merges value in object by path with provided object. Path can be string or array (e.g. ['user', 'profile', 'gender']).  
If any part of path doesn't exist it is created. Always returns new copy of object.

## Installation

  `npm install @mzvonar/mergein`

## Usage

```javascript
const mergeIn = require('@mzvonar/mergein');
  
const context = {
    user: {
        profile: {
            gender: 'female'
        }
    }
};
  
const newContext = mergeIn(context, ['user', 'profile'], {
    gender: 'male',
    address: {
        country: 'slovakia'
    }
});
 ```
 
  returns:
```javascript  
    {
        user: {
            profile: {
                gender: 'male',
                address: {
                        country: 'slovakia'
                    }
            }
        }
    }
``` 

```javascript  
const newContext = mergeIn(context, 'user', {
    address: {
      country: 'slovakia'
    }
);
 ```
 
  returns:
```javascript  
    {
        user: {
            profile: {
                gender: 'female',
            },
            address: {
                country: 'slovakia'
            }
        }
    }
``` 

## Tests

  `npm test`
npm package: @mzvonar/modular-redux-form
Description: React form library
Author: Martin Zvonar
Latest version: 1.0.2

modular-redux-form [![Build Status](https://travis-ci.org/mzvonar/modular-redux-form.svg?branch=master)](https://travis-ci.org/mzvonar/modular-redux-form) [![Coverage Status](https://coveralls.io/repos/github/mzvonar/modular-redux-form/badge.svg?branch=master)](https://coveralls.io/github/mzvonar/modular-redux-form?branch=master) [![npm version](https://badge.fury.io/js/%40mzvonar%2Fmodular-redux-form.svg)](https://badge.fury.io/js/%40mzvonar%2Fmodular-redux-form)
=========

Modified version of [redux-form](https://github.com/erikras/redux-form) by erikras.  
You should use original version. I took only some parts from the original module and modified it to my needs. It's alfa and untested.

## Installation

  `npm install @mzvonar/modular-redux-form`
npm package: @mzvonar/setin
Description: Sets value to object according to provided path and returns copy
Author: Martin Zvonar
Latest version: 0.0.19

setIn [![Build Status](https://travis-ci.org/mzvonar/setIn.svg?branch=master)](https://travis-ci.org/mzvonar/setIn) [![Coverage Status](https://coveralls.io/repos/github/mzvonar/setIn/badge.svg?branch=master)](https://coveralls.io/github/mzvonar/setIn?branch=master) [![npm version](https://badge.fury.io/js/%40mzvonar%2Fsetin.svg)](https://badge.fury.io/js/%40mzvonar%2Fsetin)
=========

Sets value in object by path and returns copy. Path can be string or array (e.g. ['user', 'profile', 'gender']).  
If any part of path doesn't exist it is created. Always returns new copy of object.

## Installation

  `npm install @mzvonar/setin`

## Parameters
```javascript
setIn(context, path, value, push);
```

| Name | Description |
| - | - |
| ```context``` | Object in which the value will be set |
| ```path``` | Must be Array or String. See usage |
| ```value``` | Value to set in path |
| ```push``` | Whether to push the value to Array. See usage |

## Usage

```javascript
import setIn from '@mzvonar/setin';
  
const context = {
    user: {
        profile: {
            gender: 'female'
        }
    }
};
  
const newContext = setIn(context, ['user', 'profile', 'gender'], 'male');
 ```
 
  returns:
```javascript  
    {
        user: {
            profile: {
                gender: 'male'
            }
        }
    }
``` 

```javascript  
const newContext = setIn(context, ['user', 'profile', 'address', 'country'], 'slovakia');
 ```
 
  returns:
```javascript  
    {
        user: {
            profile: {
                gender: 'female',
                address: {
                    country: 'slovakia'
                }
            }
        }
    }
``` 

### Push
If fourth parameter is ```true``` and last item in path is ```Array``` value is pushed to the Array

example:
```javascript       
    const context = {
        user: {
            name: 'Mike',
            nicknames: [
                'terminator',
                'maverick'
            ]
        }
    };
      
    const newContext = setIn(context, ['user', 'nickanmes'], 'vincent vega');
    
    console.log(newContext);
    /*
    {
        user: {
            name: 'Mike',
            nicknames: [
                'terminator',
                'maverick',
                'vincent vega'
            ]
        }
    }
    */
``` 

## mutableSetIn
If you need you can import mutableSetIn, which is exactly the same as setIn, but mutates the original context object without creating copy.

## Tests

  `npm test`
npm package: @mzxrai/mcp-openai
Description: MCP server for simple interaction with OpenAI API
Author: mzxrai
Latest version: 0.1.1

# MCP OpenAI Server

A Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's models right from Claude.

## Features

- Direct integration with OpenAI's chat models
- Support for multiple models including:
  - gpt-4o
  - gpt-4o-mini
  - o1-preview
  - o1-mini
- Simple message passing interface
- Basic error handling

## Prerequisites

- [Node.js](https://nodejs.org/) >= 18 (includes `npm` and `npx`)
- [Claude Desktop app](https://claude.ai/download)
- [OpenAI API key](https://platform.openai.com/api-keys)

## Installation

First, make sure you've got the [Claude Desktop app](https://claude.ai/download) installed and you've requested an [OpenAI API key](https://platform.openai.com/api-keys).

Add this entry to your `claude_desktop_config.json` (on Mac, you'll find it at `~/Library/Application\ Support/Claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "mcp-openai": {
      "command": "npx",
      "args": ["-y", "@mzxrai/mcp-openai@latest"],
      "env": {
        "OPENAI_API_KEY": "your-api-key-here (get one from https://platform.openai.com/api-keys)"
      }
    }
  }
}
```

This config lets Claude Desktop fire up the OpenAI MCP server whenever you need it.

## Usage

Just start chatting with Claude and when you want to use OpenAI's models, ask Claude to use them. 

For example, you can say,

```plaintext
Can you ask o1 what it thinks about this problem?
```

or,

```plaintext
What does gpt-4o think about this?
```

The server currently supports these models:

- gpt-4o (default)
- gpt-4o-mini
- o1-preview
- o1-mini

### Tools

1. `openai_chat`
   - Sends messages to OpenAI's chat completion API
   - Arguments: 
     - `messages`: Array of messages (required)
     - `model`: Which model to use (optional, defaults to gpt-4o)

## Problems

This is alpha software, so may have bugs. If you have an issue, check Claude Desktop's MCP logs:

```bash
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
```

## Development

```bash
# Install dependencies
pnpm install

# Build the project
pnpm build

# Watch for changes
pnpm watch

# Run in development mode
pnpm dev
```

## Requirements

- Node.js >= 18
- OpenAI API key

## Verified Platforms

- [x] macOS
- [ ] Linux

## License

MIT

## Author

[mzxrai](https://github.com/mzxrai)