open-index/open-npm huggingface dataset:
npm package: @qnighy/marshal
Description: Decoder for Ruby's Marshal
Author: Masaki Hara
Latest version: 0.1.3

## `@qnighy/marshal`

Parses data exported by Ruby's `Marshal.dump`.

## Quickstart

```
npm install --save @qnighy/marshal
# OR
yarn add @qnighy/marshal
```

```javascript
import { Marshal } from "@qnighy/marshal";
// OR
const { Marshal } = require("@qnighy/marshal");

const buf = Uint8Array.from([
  4, 8, 123, 7, 58, 9, 110, 97, 109, 101, 73, 34, 8, 102, 111, 111, 6, 58, 6,
  69, 84, 58, 12, 110, 117, 109, 98, 101, 114, 115, 91, 8, 105, 6, 105, 7, 105,
  8,
]);
const data = Marshal.parse(buf);
// => { name: 'foo', numbers: [ 1, 2, 3 ] }
```

## API

### `Marshal.parse`

Parses a data exported by Ruby's `Marshal.load`.

- Parameters
  - `buf`: `Uint8Array` <br>
    a binary data to parse
- Returns
  - `unknown` <br>
    the decoded value
- Throws
  - `MarshalError` <br>
    when the data contains an invalid format.

### `parse`

Same as `Marshal.parse`.

### `MarshalError`

An exception raised when `loadMarshal` encountered an invalid format.

- Superclass
  - `Error`

## Notes on conversion

Ruby's value structure doesn't correspond to that of JavaScript. Here is how `@qnighy/marshal` converts values:

- `Fixnum`s, `Bignum`s, and `Float`s are all converted to `number`s.
- `String`s and `Symbol`s are all converted to `string`s.
  - Encoding specifications are ignored and all strings are interpreted in UTF-8.
  - Bytes invalid as UTF-8 are replaced by U+FFFD.
- `Hash`es are converted to `object`s.
  - Only keys that are a `number` or a `string` (including ones that were `Symbol`s) are picked.
  - Any other keys (`nil`, `[1, 2]`, etc.) are discarded.
  - If it has default value, it's replaced as the special `__ruby_default` key.
- `Struct`s are converted to `object`s.
- `Regexp`s are converted to `RegExp`s.
  - Flags are ignored in the current version.
  - Syntax errors in `new RegExp(...)` are propagated in the current version.
- Plain `Object`s are converted to empty objects.
- Classes and modules are converted to empty objects.
- All instance variables and class information are discarded.
  Even instances of subclasses of `String`, `Array`, `Hash`, and `Regexp` will be
  recognized the same as instances of their base classes.
- If two occurrences of objects pointed to the identical object in Ruby, they will be identical in JS.
  - This rule doesn't apply when the object was parsed as a primitive value in JS.
    Examples include `Bignum`, `Float`, and `String`.
- Cyclic references are kept as-is.

## License

MIT
npm package: @qninhdt/typespec-zod
Description: TypeSpec emitter that generates Zod schemas from TypeSpec types.
Author: Nguyen Quang Ninh
Latest version: 0.5.0

# @qninhdt/typespec-zod

This lowercase file is kept only as a compatibility pointer for tools or environments that resolve `readme.md` instead of `README.md`.

For the real documentation, use:

- [`README.md`](/home/qninh/projects/typespec-libraries/packages/typespec-zod/README.md)

---

Made with heart by @qninhdt, with GPT-5.4 and Claude Opus 4.6.
npm package: @qnit/react-modal-manager
Description: A simple tool for organized modals in your application.
Author: Pavlo Z.
Latest version: 1.3.1

# @qnit/react-modal-manager

A simple tool for organized modals in your application.

## Usage:

1. Import the proivider component

```
import { ModalProvider } from 'react-modal-provider';
```

2. Wrap your App in ModalProvider:

```
<ModalProvider>
  <App />
</ModalProvider>
```

3. Import useModalQueue hook in the component where you whant your modal to be:

```
import { useModalQueue } from '@qnit/react-modal-manager';

const { modals, queueModal } = useModalQueue()
```

4. Use queueModal function to add a modal to a tree with either string for default modal, or react node:

```
const showModal = () => {
  queueModal({content: 'My Modal!'})
}

const showModal2 = () => {
  const newModal = (
    <div>
      <h1>New Modal</h1>
      <p>This is a new modal window.</p>
    </div>
  )
  queueModal({ content: newModal, onClose: () => { console.log('Modal closed'); } });
}
```
5. You can pass an onClose callback to the queueModal function, callback will execute before closing the modal. Async callbacks are supported and closing resolves after the callback.

## Debugging with provider options
1. Universal Logs.
```false``` by default. Pass as ```true``` to see logs, warning and errors from undergoing processes and more info about your modals.
```
<ModalProvider options={{ universalLogs: true }}>
```
2. RethrowOnCloseError.
```true``` by default. Pass as ```false``` to execute closing logic despite the errors in your onClose callback.
```
<ModalProvider options={{ universalLogs: true, rethrowOnCloseError: false }}>
```

## Customization
Excluding custom modals, you can customise styles of the modal differently:

### Options object 
You can pass options object right into queueModal function like so: 
```
  queueModal({content: 'hihihi', onClose: () => { console.log('Modal closed') }, options: { position: 'top-right' } });
```


### Inline styles
Just pass the styles into ModalProvider component, and they will be applied to the default modal component:
```
<ModalProvider styles={{ background: 'red'}}>
  <App />
</ModalProvider>
```

### Custom default component
You can also create a component for provider to use by default using ``` ModalOverride ``` prop like so:
```
<ModalProvider ModalOverride={DefaultOverrideExample}>
  <App />
</ModalProvider>
```

Inside your component, import ```ModalGeneric``` type
```
import type { ModalGeneric } from "react-modal-provider";
```

And set props for your component as:
```
const DefaultOverrideExample: React.FC<PropsWithChildren<{} & ModalGeneric>> = ({ children, onClose, styles })
```

```children``` prop will be used as a slot for content you pass to the modal and 
```onClose``` will execute closing and additional callback, if you added them from _queueModal_

Every modal will automatically open on top of the old one and close when you press on the background.


## License
MIT © 2025 Pavlo Zabuha
npm package: @qnkhuat/deepread
Description: A PDF reader application with AI chat capabilities
Author: qn.khuat@gmail.com
Latest version: 0.0.8

# DeepRead

DeepRead is a PDF reader application that allows you to chat with your documents using AI. It processes PDFs and lets you interact with them using various LLM providers.

## Features

- Upload and view PDF documents
- Extract text from PDFs
- Chat with AI about the document content
- Support for multiple LLM providers (OpenAI, Anthropic, etc.)
- Cost tracking for API usage

## Frontend-Only Architecture

This application is designed to run entirely in the browser without a backend server. All PDF processing and LLM interactions happen directly in the frontend:

- PDF processing is done using PDF.js
- LLM interactions use the OpenAI JavaScript client library
- All API keys are stored locally in the browser

## Usage

1. Open the application in your browser or desktop app
2. Configure your LLM provider API keys in the settings
3. Upload a PDF document
4. Chat with the AI about the document content

## Supported LLM Providers

- OpenAI
- Anthropic 
- DeepSeek
- Ollama (local models)

## License

This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.

Copyright 2025 qn.khuat@gmail.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
npm package: @qnnp/q-utils
Description: 微信小程序实用封装
Author: qnnp
Latest version: 0.1.35

# Q-Utils

---
## 简介 Introduction
这是一个开发微信小程序（后期可能支持其他平台）的实用工具封装
### 目前有的：
- 请求封装，提供 `REQUEST` `GET` 等小程序支持的请求方法封装
    - `REQUEST` 请求封装还提供文件小程序不具备的批量上传能力
- `getType: string` 函数，用于获取给定目标的类型信息，返回值如：`function` `object` `array` 等

## 安装 Install

``` text
npm i @qnnp/q-utils
```

## 使用 Usage
### 基本
``` typescript
// app.ts
import { init } from '@qnnp/q-utils'
App<IAppOption>({
  onLaunch () {
    // 初始化工具会自动检查小程序更新并获取相关环境信息储存至全局
    init(this)
    GET('userinfo')
      .then(...)
      .catch(...)
  },
  globalData: {},
  config    : {
    // 认证使用的 Token 类值
    token: 'the token'
    // 项目将要用到的认证方式和认证 key 名
    authType: 'cookie', // 还可为 header
    authKey : 'PHPSID',
    // 以上设置示例将会在每次请求时自动带上 cookie 头
    // cookie: PHPSID=the%20token; 
    // 如果设置 authType 为 header 则会携带头信息
    // PHPSID: the%20token
    
    // 默认 API 服务器地址
    API_HOST: 'https://example.com/api/',
    // 开发版 API 服务器地址 (optional)
    DEV_API_HOST: 'https://dev.example.com/api/',
    // 体验版 API 服务器地址 (optional)
    TRIAL_API_HOST: 'https://trial.example.com/api/',
    // 开发版和体验版未设置时默认使用 API_HOST
    // 设置 API_HOST 之后每次请求可以使用绝对地址可相对地址
    // 如 GET('/test') 会请求 https://example.com/test
    // 如 GET('test') 会请求 https://example.com/api/test
    
    // 请求成功中间件，必须执行 resolve 或者 reject 对应成功或者失败
    requestSuccessMiddleware (res, resolve, reject) {
      if (res.statusCode < 400) {
        resolve(res)
      } else {
        reject({ errno: res.statusCode, errMsg: res.errMsg })
      }
    },
    // 请求失败中间件，必须调用 reject
    requestFailMiddleware (err, reject) {
      reject(err)
    }
  },
})
```
### 基本请求封装
``` typescript
REQUEST(
  options: WxRequestOption,
  listen?: RequestListen
): Promise<WxResponse>
```

基本使用方法可以查看 [微信文档：wx.request(options: WxRequestOption)](https://developers.weixin.qq.com/miniprogram/dev/api/network/request/wx.request.html) 与微信原版不同的是工具提供的 `REQUEST` 可以实现同一个方法传参同时上传多个文件。
当需要携带文件时仅需在 `options.data` 中增加一个数组字段即可，`options.data` 示例如下：
``` typescript
const options: WxRequestOption = {
  url: 'upload',
  header : {
    'content-type': 'multipart/form-data'
  },
  data: {
    field_1: 'value',
    field_2: 'value',
    file_1: ['fileName.exc', 'http://tmp/...tmpName.png'],
    file_2: ['fileName.exc', 'http://tmp/...tmpName.png'],
  },
  timeout: 60000 // 上传需要设置超时时长，避免操作超时
}
```
`listen` 为传递 `wx.request` 所产生的 `RequestTask` 对象的 callback
### 请求方法再封装
```
GET( // OPTIONS | HEAD | POST | PUT | DELETE | TRACE | CONNECT
  url: string,
  data?: object,
  options?: RequestOption,
  listen?: RequestListen
)
```
调用方法和 `REQUEST` 差不多，只是单独拉出 `url` `data` 两个参数方便调用。
npm package: @qnnp/wpreact
Description: Made with create-react-library
Author: qnnp
Latest version: 1.0.26-dev

# @qnnp/wpreact

> Made with create-react-library

[![NPM](https://img.shields.io/npm/v/@qnnp/wpreact.svg)](https://www.npmjs.com/package/@qnnp/wpreact) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save @qnnp/wpreact
```

## Usage

```jsx
import React, { Component } from 'react'

import MyComponent from '@qnnp/wpreact'
import '@qnnp/wpreact/dist/index.css'

class Example extends Component {
  render() {
    return <MyComponent />
  }
}
```

## License

MIT © [](https://github.com/)