open-index/open-npm huggingface dataset:
npm package: @h-i/react-native-blocks
Description: React Native UI Toolkit
Author: Sergey Alimov & Nick Seryakov
Latest version: 0.0.3

# React Native UI Toolkit [![Build Status](https://travis-ci.com/AlimovSV/react-native-blocks.svg?branch=master)](https://travis-ci.com/AlimovSV/react-native-blocks)
npm package: @h-lumos/llm-sdk
Description: 通用大模型 SDK
Author: Lhuade
Latest version: 0.0.1

# @h-lumos/llm-sdk

通用大模型 SDK

## 📖 使用文档

- [文心一言](./doc/ernie.md)
- [通义千问](./doc/qwen.md)
- [讯飞星火](./doc/spark.md)
- [混元助手](./doc/hunyuan.md)
- [Minimax](./doc/minimax.md)
- [ImagineArt](./doc/vyro.md)

## 📦 安装

要安装 `@h-lumos/llm-sdk`，请运行以下命令:

```bash
$ pnpm install @h-lumos/llm-sdk
```

## 👋 使用

在这里获取你的 [accessToken](https://aistudio.baidu.com/index/accessToken) 值。

```ts
import { ErnieAI } from '@h-lumos/llm-sdk';

const client = new ErnieAI({
  apiKey: 'My API Key', // defaults to process.env["EB_API_KEY"]
});

async function main() {
  const chatCompletion = await client.chat.completions.create({
    model: 'ernie-bot-turbo',
    messages: [{ role: 'user', content: 'Say this is a test' }],
  });
}

main();
```

### 支持流式

使用与 OpenAI 的 SDK 完全一致。

```ts
import { ErnieAI } from '@h-lumos/llm-sdk';

const client = new ErnieAI();

async function main() {
  const stream = await client.chat.completions.create({
    model: 'ernie-bot-turbo',
    messages: [{ role: 'user', content: 'Say this is a test' }],
    stream: true,
  });

  for await (const chunk of stream) {
    process.stdout.write(chunk.choices[0]?.delta?.content || '');
  }
}

main();
```
npm package: @h-lumos/memory-monitor
Description: 一个 JavaScript 内存监控工具，使用 Vite 构建，支持多种环境
Author: lianghuade
Latest version: 0.0.1

# memory-monitor-js

一个用于监控前端项目在浏览器内存使用情况的 JavaScript 插件，基于 TypeScript 开发，支持多种环境，适合现代前端项目集成。

## 特性

- 定时检测浏览器 JS 堆内存占用
- 支持自定义告警/临界阈值
- 支持自定义上报/处理函数
- 支持自动或手动启动
- 提供停止监控和获取当前内存占用方法
- TypeScript 类型支持

## 安装

```bash
npm install memory-monitor-js
# 或
pnpm add memory-monitor-js
```

## 快速开始

### 1. 自动启动监控

```ts
import { initMemoryMonitor } from 'memory-monitor-js';

initMemoryMonitor(); // 默认自动启动
```

### 2. 手动启动/停止

```ts
import { initMemoryMonitor } from 'memory-monitor-js';

const monitor = initMemoryMonitor(false); // 不自动启动
monitor.start(); // 手动启动
monitor.stop();  // 停止监控
```

### 3. 自定义配置

```ts
import { MemoryMonitor, MemoryMonitorConfig } from 'memory-monitor-js';

const config: MemoryMonitorConfig = {
  intervalMs: 60_000, // 检测间隔 1 分钟
  warnLevel: 0.7,     // 70% 告警
  criticalLevel: 0.9, // 90% 临界
  reportFn: (ratio, level) => {
    if (level === 'warn') {
      alert(`内存占用告警: ${(ratio * 100).toFixed(1)}%`);
    } else {
      alert(`内存占用临界: ${(ratio * 100).toFixed(1)}%，即将刷新页面`);
    }
  }
};

const monitor = new MemoryMonitor(config);
monitor.start();
```

## API

### MemoryMonitorConfig

| 属性           | 类型                                              | 说明                       |
| -------------- | ------------------------------------------------- | -------------------------- |
| intervalMs     | `number`                                          | 检测间隔（毫秒），默认 300000 |
| warnLevel      | `number` (0~1)                                    | 告警阈值，默认 0.75        |
| criticalLevel  | `number` (0~1)                                    | 临界阈值，默认 0.9         |
| reportFn       | `(ratio: number, level: 'warn' \| 'critical') => void` | 内存超阈值回调             |

### MemoryMonitor

- `start(): void` 启动监控
- `stop(): void` 停止监控
- `getRatio(): number | undefined` 获取当前内存占用比例

### initMemoryMonitor(autoStart = true): MemoryMonitor

初始化并返回默认监控实例。

## 注意事项

- 仅支持支持 `performance.memory` 的浏览器（如 Chrome）。
- 低版本浏览器或部分移动端浏览器不支持该特性。

## 贡献

欢迎提 issue 或 PR！

## License

MIT
npm package: @h-platform/core
Description: This package defines exception filter for nestjs
Author: Yasir Hantoush
Latest version: 0.1.3

## NestJS Exception Eilter
This package proved exception filter for nestjs server that is compatible with CommandResponse schema defined in @h-platform/cqm npm package
It also provide CommandError, which extends HttpException defined in nestjs framework.
This is handy to throw exceptions that are compatible with CommandResponse format.
npm package: @h-reser/deferred
Description: A lightweight deferred implementation with Typescript support, inspired by jQuery and based on Javascript's Promise.
Author: Heinz Reser
Latest version: 1.1.0
Deprecated: this package has been deprecated

# @h-reser/deferred
[![Build Status](https://travis-ci.com/h-Reser/deferred.png?branch=master)](https://travis-ci.com/h-Reser/deferred)
[![npm version](https://badge.fury.io/js/%40h-reser%2Fdeferred.svg)](https://badge.fury.io/js/%40h-reser%2Fdeferred)
[![dependencies Status](https://david-dm.org/h-Reser/deferred/status.svg)](https://david-dm.org/h-Reser/deferred)
[![devDependencies Status](https://david-dm.org/h-Reser/deferred/dev-status.svg)](https://david-dm.org/h-Reser/deferred?type=dev)

A lightweight deferred implementation with Typescript support, inspired by jQuery and based on Javascript's Promise.

## Installation

```
npm i @h-reser/deferred
```

## Usage
```
import Deferred from "@h-reser/deferred";

// Create deferred object
const d = new Deferred();

// Implement logic
function playLottery() {
  setTimeout(() => {
    const random = Math.floor(Math.random() * Math.floor(2));
    if (random === 1)
      d.resolve("You have won!");
    else d.reject("You have lost...");
  }, 500);
};

// Handle Defered fulfillments and rejections
d
  .then((res) => {
    console.log(res + " :)");
  })
  .catch((e) => {
    console.error(e + " :(");
  })
  .finally(() => {
    console.log("Thanks for playing!");
  });

// Execute logic
playLottery();
```

## When to use
Can be used in any environment which supports ES6's promises