open-index/open-npm huggingface dataset:
npm package: @oawu/ddns
Description: 🌐 給予我的 IP 一個漂亮的名稱吧 DDNS
Author: OA Wu
Latest version: 1.0.7

# OA's Node DDNS

給予我的 IP 一個漂亮的名稱吧 DDNS 🌐

## 說明

目前只支援 [Cloudflare](https://www.cloudflare.com/zh-tw/)，主要是將目前對外的網際網路 IP 更新至 DNS 服務平台上。

## 安裝

```shell
npm install @oawu/ddns
```

## 使用

1. 更新

```javascript
  const DDNS = require('@oawu/ddns')
  const cloudflare = DDNS.Cloudflare('auth_token', 'domain', ['sub'])

  // 第二參數 是否顯示 log
  cloudflare.update((error, data) => {
    console.error(error, data);
  }, true)
```

2. 監控

```javascript
  const DDNS = require('@oawu/ddns')
  const cloudflare = DDNS.Cloudflare('auth_token', 'domain', ['sub'])

  DDNS.Watch(cloudflare, 1000)
```
npm package: @oawu/dog
Description: 🐶 我的看門狗
Author: OA Wu
Latest version: 1.0.1

# OA's Node.js Dog

我的看門狗 🐶


## 說明
很簡單就是一個 Watch 機制。

## 安裝

```shell
npm install @oawu/dog
```

## 使用

引入 `require('@oawu/dog')` 即可使用 **dog** 功能，如下範例：

```javascript

  const Dog = require('@oawu/dog')

  const dog = Dog().bite(food => {
    // 當小狗咬到東西時，即可取出食物
    console.error(food)
  })

  Promise.all([
    new Promise((resolve, reject) => {
      setTimeout(_ => resolve(1), 1000)
    }),
    new Promise((resolve, reject) => {
      setTimeout(_ => resolve(2), 1200)
    }),
  ])
    .then(results => dog.eat(results)) // 餵給小狗食物
    .catch(dog.eat)
```
npm package: @oawu/helper
Description: 🤝 一些常用的小工具
Author: OA Wu
Latest version: 3.0.4

# OA's Node Helper

一些常用的小工具 🤝


## 說明
很簡單就是一個 OA 個人 [Node.js](https://nodejs.org/) 的 [npm](https://www.npmjs.com/) 小幫手！

## 安裝

```shell
npm install @oawu/helper
```

## 使用

引入 `require('@oawu/helper')` 即可使用，如下範例：

```javascript

  const Helper = require('@oawu/helper')
  Helper.println('Hi~')

```
npm package: @oawu/lcd1602
Description: 🖥 node.js 的 LCD1602 工具
Author: OA Wu
Latest version: 1.0.3

# OA's Md5 Function

一起來用 node.js 控制 LCD1602 吧！ 🖥


## 說明
* 這是一個利用 [`i2c-bus`](https://www.npmjs.com/package/i2c-bus) 來控制 [`LCD1602 顯示器`](http://wiki.sunfounder.cc/index.php?title=LCD1602_Module) 的工具，主要是使用 [Node.js](https://nodejs.org/en/) 製作的 [NPM](https://www.npmjs.com/) 套件。
* 函式庫做法主要參考了 [python-liquidcrystal_i2c](https://github.com/pl31/python-liquidcrystal_i2c/blob/master/liquidcrystal_i2c/liquidcrystal_i2c.py) 與 [RPi_I2C_LCD_driver](https://github.com/eleparts/RPi_I2C_LCD_driver/blob/master/original_example/examples.py) 的邏輯部分。

## 安裝

```shell
npm install @oawu/lcd1602
```


## 使用

引入 `require('@oawu/lcd1602')` 即可使用 **lcd1602** 功能，如下範例：

```javascript

  const LCD = require('./index.js')
  const lcd = new LCD()
  lcd.text(0, 0, 'hello world!')

```
npm package: @oawu/nuxt-scss
Description: 🔺 Nuxt.js 也要把 scss 變成 css！
Author: OA Wu
Latest version: 1.0.5

# OA's Nuxt.js scss 轉換工具

OA's Nuxt.js scss 轉換工具 🔺


## 說明
這是一個給 Nuxt.js 編譯 scss 的轉譯工具！

基於 npm 上的 [@oawu/scss](https://www.npmjs.com/package/@oawu/scss) 開發的應用工具。

## 安裝

```shell
npm install @oawu/nuxt-scss
```

## 使用

1. 於 `~/assets/` 內建立 `css`、`scss`、`icon` 目錄
2. 於專案目錄的終端機內執行 `npx oawu-scss` 即可開始編譯

## 參數

可以指定目錄，預設是在 `assets` 目錄
* 指定 css 目錄 `-C` 或 `--css`，例如專案目錄下的 `assets/oa/css` 就執行 `npx oawu-scss -C assets/oa/css`
* 指定 scss 目錄 `-S` 或 `--scss`，例如專案目錄下的 `assets/oa/scss` 就執行 `npx oawu-scss -S assets/oa/scss`
* 指定 icon 目錄 `-I` 或 `--icon`，例如專案目錄下的 `assets/oa/icon` 就執行 `npx oawu-scss -I assets/oa/icon`

> 如果不存在的路徑，則會幫你建立目錄
npm package: @oawu/queue
Description: 🚗… 將須同步處理的事件或功能，以 Queue 的方式依序處理，排排站吧，你們這些傢伙！
Author: OA Wu
Latest version: 1.0.17

# OA's Node.js Queue

排排站吧，你們這些傢伙！ 🚗… 🚗… 🚗… 


## 說明
將須同步處理的事件或功能，以 Queue 的方式依序處理，或許大家會採用 Promise 的方式處理同步問題，但如果各個 Promise 是需要先後順序或者相依的參數，那可以參考本套件喔！


## 安裝

```shell
npm install @oawu/queue
```


## 使用

定義要執行的 function，依照 enqueue 進去的順序執行，當事件執行完後，呼叫 next 來執行下一個 enqueue

其執行的順序主要就是依據被 enqueue 的先後順序，如下範例則會依序執行 queue 1, queue 2, queue 3, queue 4

queue 4 在程式碼中雖然是先定義了，但因為 timeout 關係，所以會被最晚 enqueue，故會最後執行。

```javascript

  const Queue = require('@oawu/queue.js')
  const queue = new Queue()

  // define queue 1
  queue.enqueue(next => {

    setTimeout(() => { // someAsyncFunction
      next({ a: 1 }) // someAsyncFunction Finish! pass data to next queue
    }, 1000)
  })
  
  // define queue 2
  queue.enqueue((next, lastParams) => {
    console.log(lastParams) // { a: 1 }

    setTimeout(() => { // someAsyncFunction
      next({ a: 2 }) // someAsyncFunction Finish! pass data to next queue
    }, 1000)
  })

  setTimeout(() => {
    // define queue 4
    queue.enqueue((next, lastParams) => {
      console.log(lastParams) // { a: 3 }
    })
  }, 5000)
  
  setTimeout(() => {
    // define queue 3
    queue.enqueue((next, lastParams) => {
      console.log(lastParams) // { a: 2 }

      next({ a: 3 }) // someAsyncFunction Finish! pass data to next queue
    })
  }, 1000)

```


## 物件

共享，`@oawu/queue` 內有預設的共用物件，簡單或需共用的環境下可以直接使用，如下範例：

```javascript
  const Queue = require('@oawu/queue.js')
  const queue = Queue()

  queue.enqueue(next => {
    // ...
  })
```

大小，`@oawu/queue` 可以使用 `size` 取得目前剩正在執行與餘未執行的事件，如下範例：

```javascript
  const Queue = require('@oawu/queue.js')
  const queue = Queue.create()

  queue.enqueue(next => {
    console.log(queue.size)
  })
```

清空，`@oawu/queue` 可以使用 `clean` 將目前剩餘未執行的事件全部清空，並且結束執行，直到有新的事件 `enqueue`，如下範例：

```javascript
  const Queue = require('@oawu/queue.js')
  const queue = new Queue()

  queue.enqueue(next => {
    queue.clean()
  })

  queue.enqueue(next => {
    // ... 不會被執行
  })
```


## Queue.Dispatch

這是一個可以不斷往 Queue 丟的的功能，並且指定幾個 worker 處理任務
如下範例：


```javascript
  const Queue = require('@oawu/queue.js')
  const dispatchQueue = Queue.Dispatch(3) // 指定 3 個 worker 執行任務
  
  dispatchQueue
    .enqueue(next => {
      console.error('enqueue 1')
      setTimeout(next, 2000)
    })
    .enqueue(next => {
      console.error('enqueue 2')
      setTimeout(next, 1000)
    })
    .enqueue(next => {
      console.error('enqueue 3')
      setTimeout(next, 1300)
    })
    .enqueue(next => {
      console.error('enqueue 4')
      setTimeout(next, 2000)
    })
    .enqueue(next => {
      console.error('enqueue 5')
      setTimeout(next, 100)
    })
  
  dispatchQueue
    .exec(_ => { // 開始執行以上任務
      console.error('ok')
    })

  // 以上 1、2、3 會非同步併發執行，而 2 會先結束，接著會加入執行 4，等 3 結束後執行 5，所以依序如下：
    // 1 2 3
    // 1 3 4
    // 1 4 5
    // 1 4
    // 4
```
npm package: @oawu/scss
Description: 📝 看我把 scss 變成 css！
Author: OA Wu
Latest version: 3.0.7

# OA's Node scss 轉換工具

OA's Node scss 轉換工具 📝


## 說明
基於 npm 上的 [sass](https://www.npmjs.com/package/sass) 開發的應用工具，同時加入些許 [compass](http://compass-style.org/) 相關的 [`mixin`](https://sass-lang.com/documentation/at-rules/mixin) 或 [`function`](https://sass-lang.com/documentation/at-rules/function) 以便於使用。

## 安裝

```shell
npm install @oawu/scss
```


## 使用

引入 `require('@oawu/scss')` 即可使用 **scss** 功能，如下範例：

```javascript

  const SCSS = require('@oawu/scss')

  SCSS.file('/paths.../some.scss', (error, result) => {
    // done..
  })

  // or
  SCSS.data('$w: 100px; div { width: $w; }', (error, result) => {
    // done..
  })

```

## 其他功能

可以使用 `@import "@";` 來使用此套件的相關功能，其參考目錄為 [Libs](https://github.com/oawu/npm-scss/tree/master/Libs)

```scss
  @import "@";

  * {
    &, &:after, &:before {
      vertical-align: top;
      @include box-sizing(border-box);
      @include font-smoothing(subpixel-antialiased);
    }
  }
```

若要使用 Libs 下的其他功能，例如 `CSS3/Cursor` 內所有功能與 `CSS3/Font/Face.scss`，使用方式如下：

```scss

  @import "@/CSS3/Cursor";
  @import "@/CSS3/Font/Face";

```


### 特殊功能

可以使用 `@import "*";` 或 `@import "Lalilo";` 來快速使用 [Lalilo](https://github.com/oawu/Lalilo) 框架常用功能，其引入的功能可以參考 [`Lalilo.scss`](https://github.com/oawu/npm-scss/blob/master/Libs/Lalilo.scss) 此檔案。

```scss
  @import "*";

  * {
    &, &:after, &:before {
      vertical-align: top;
      @include box-sizing(border-box);
      @include font-smoothing(subpixel-antialiased);
    }
  }
```

由於 `@import "Lalilo";` 為直接指定的快取檔案，主要目的是為了加快編譯速度，當然您可以自定義引入的檔案內容。

預設的快取檔案為 [`Lalilo.scss`](https://github.com/oawu/npm-scss/blob/master/Libs/Lalilo.scss)，但可以使用 `Scss.contents` 來改變快取檔案內容。

以下範例為改變 `@import "Lalilo";` 後所引入的內容：

```javascript
  const SCSS = require('@oawu/scss')
  SCSS.contents = "%-tmp {}"
```

```scss
  @import "Lalilo";

  div {
    @extend %-tmp;
  }
```

### 自動編譯

資料結構如下，其實可以使用 `watch.js` 來自動編譯 scss 檔案。

```
project/
  + css/
  + scss/
    + index.scss
  + watch.js
```

``` scss
  // index.scss
  @import "*";

  a {
    @include border-radius(10px);
    background-color: rgba(0, 0, 255, 0.2);
    border: 1px solid rgba(255, 0, 0, .3);
  }
```

``` javascript
  // watch.js
  const { watch } = require('@oawu/scss')

  watch
    .scssDir('scss')
    .cssDir('css')
    .start()
```

終端在 **專案目錄** 下，執行 `node watch.js` 即可啟動自動編譯。

`scssDir` 與 `cssDir` 兩個目錄可以擺放與 `watch.js` 相對的路徑目錄，亦可擺放絕對目錄。


## 參考 
* compass 功能參考:
  * [https://github.com/Igosuki/compass-mixins](https://github.com/Igosuki/compass-mixins)
  * [https://www.npmjs.com/package/compass-mixins](https://www.npmjs.com/package/compass-mixins)
npm package: @oawu/uploader
Description: ☁️ 上傳無上限，不管是 S3 或 GitHub
Author: OA Wu
Latest version: 3.0.6

# OA's Upload

上傳無上限，不管是 S3 或 GitHub ☁️


## 說明
針對指定的目錄，將內容上傳至 [AWS S3](https://aws.amazon.com/tw/s3/) 或 [GitHub Pages](https://pages.github.com/)

## 安裝

```shell
npm install @oawu/uploader
```


## 使用

引入 `require('@oawu/uploader')` 並選擇要上的平台，如下 S3 範例：

```javascript
  const { S3 } = require('@oawu/uploader')

  const destDir = '/.../dir/'

  const s3 = S3(destDir, {
    bucket: '',
    access: '',
    secret: '',
    region: ''
  })

  s3.execute(step, error => {
    // Error or Success
  })
```

> execute 當有帶入 callback 時，會變成同步，反之則會變成非同步(async)

### 共用參數

* `destDir` ─ 上傳的目錄，此為 **必填**
* `prefix` ─ 前綴路徑，此為 `''`
* `ignoreNames` ─ 忽略的檔案名稱(主檔名＋副檔名)，預設 `[]`
* `ignoreExts` ─ 忽略的副檔名，預設 `[]`
* `ignoreDirs` ─ 忽略的目錄名稱，預設 `[]`

### S3 參數

* `bucket` ─ S3 的 **Bucket** 名稱，此為 **必填**
* `access` ─ S3 的 **Access** Key，此為 **必填**
* `secret` ─ S3 的 **Secret** Key，此為 **必填**
* `region` ─ S3 的 **Region** Key，此為 **必填**
* `option` ─ 上傳 S3 時要的參數，可參考 [`aws-sdk`](https://aws.amazon.com/tw/sdk-for-node-js/)，預設 `{}`

### Github 參數

* `account` ─ GitHub 上的帳號，此為 **必填**
* `repository` ─ GitHub 上的倉庫，此為 **必填**
* `branch` ─ GitHub 上的 pages 分支，預設 `gh-pages`
* `message` ─ 紀錄時的文字訊息，預設 `🚀 部署！`

> 使用 Github 時，請先確保您的終端機可以正常 Push Git

以下為 GitHub 範例：

```javascript
  const { GitHub } = require('@oawu/uploader')

  const destDir = '/.../dir/'

  const gitHub = GitHub(destDir, {
    account: '',
    repository: '',
    isDisplay: true
  })

  gitHub.execute(step, error => {
    // Error or Success
  })
```

## step 為每一步驟的 callback，其格式如下：

```
 async function(string, async function(setter));
```

setter 格式如下：

```
{
  total: _ => { }, // 數量
  advance: _ => { }, // 進度
}
```
npm package: @oawu/xterm
Description: 🌈 轉吧，終端機的七彩霓虹燈
Author: OA Wu
Latest version: 1.0.9

# OA's Node.js Xterm

🌈 轉吧，終端機的七彩霓虹燈


## 說明
將 Node.js 在終端機上輸出的文字給予色彩，並支援 String prototype

![@oawu/xterm](xterm.png)

## 安裝

```shell
npm install @oawu/xterm
```


## 使用

引入 `require('@oawu/xterm')` 即可使用 **xterm** 功能，如下範例：

```javascript

  const Xterm = require('@oawu/xterm')
  console.log(Xterm.red('紅').toString())
  console.log('' + Xterm.red('綠')) // 使用預設 toString

```

開啟支援 String prototype

```javascript

  const Xterm = require('@oawu/xterm')
  Xterm.stringPrototype()

  console.log('紅'.red)
  console.log('紅綠'.red.bgGreen) // 可以連續設定

```

其他功能

```javascript

  const Xterm = require('@oawu/xterm')

  Xterm.blod('粗體') // 增粗也提高亮度
  Xterm.dim('細體') // 變細也減低亮度
  Xterm.underline('底線') // 加入底線
  Xterm.inverted('反轉') // 前景與背景色對調
  Xterm.italic('斜體') // 視字體與語言而有所不同效果
  
  Xterm.blink('連結') // 視終端機不同而有所不同效果
  Xterm.hidden('隱藏') // 視終端機不同而有所不同效果

```
npm package: @oazapfts/resolve
Description: Resolve OpenApi references
Latest version: 1.0.0

# @oazapfts/resolve

JSON Schema reference resolver from [Oazapfts](https://github.com/oazapfts/oazapfts).

## Installation

```
npm install @oazapfts/resolve
```

## Usage

```typescript
import { createResolver } from "@oazapfts/resolve";

const spec = {
  openapi: "3.0.0",
  info: { title: "Test API", version: "1.0.0" },
  paths: {},
  components: {
    schemas: {
      Test: {
        type: "object",
        properties: {
          id: { type: "string" },
        },
      },
    },
  },
};

const resolve = createResolver(spec);
console.log(resolve({ $ref: "#/components/schemas/Test" }));
```

# License

MIT
npm package: @oazhu/eslint-config-vue
Description: 关于vue,原生js,ts的eslint配置
Author: azhu
Latest version: 1.0.4

## 前端规范校验

### 参考文档
* eslint <http://eslint.cn/docs/user-guide/getting-started>
* airbnb <https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb-base>
* eslint-plugin-vue <https://eslint.vuejs.org/>
* typescript-eslint <https://typescript-eslint.io/>


### 使用方法
**如果不使用prettier `eslint-config-prettier` 和 `eslint-plugin-prettier`无需下载**
npm
`npm i -D eslint eslint-plugin-vue @typescript-eslint/eslint-plugin @typescript-eslint/parser @az/eslint-config-vue eslint-plugin-prettier eslint-config-prettier`

yarn
`yarn add -D eslint eslint-plugin-vue @typescript-eslint/eslint-plugin @typescript-eslint/parser @az/eslint-config-vue eslint-plugin-prettier eslint-config-prettier`


```javascript
// .eslintrc.js
module.exports = {
  env: {
    es6: true,
    browser: true,
    node: true
  },
  parserOptions: {
    parser: '@typescript-eslint/parser',
    sourceType: 'module',
    ecmaFeatures: {
      jsx: true
    }
  },
  // 如果不使用prettier 'plugin:prettier/recommended'不建议添加
  extends: ['@az/eslint-config-vue', 'plugin:prettier/recommended']
}

```


建议搭配prettier使用 
```javascript
// prettier.config.js
module.exports = {
  printWidth: 120,
  semi: false,
  vueIndentScriptAndStyle: false,
  singleQuote: true,
  trailingComma: 'none',
  proseWrap: 'never',
  htmlWhitespaceSensitivity: 'strict',
  endOfLine: 'auto'
}

```
npm package: @oazmi/esbuild-types
Description: this library simply re-exports esbuild's typescript declarations file, so that your client won't have to install esbuild just for its types only.
Author: Omar Azmi
Latest version: 0.28.0

# @oazmi/esbuild-types

this library simply re-exports esbuild's typescript declarations file, so that your client won't have to install esbuild just for its types only.

### rationale

in deno, there is no such thing as `devDependencies`, so if you write an esbuild-plugin utilizing esbuild's types,
deno will download the entirety of the esbuild package from npm, even if you only import your plugin library from [jsr](https://jsr.io).

thus, this library provides a lightweight type-definitions only alternative to `npm:esbuild`, using the same minor versioning that esbuild uses.

### example

your old horizontally-challenged phat code:

```ts
import type * as esbuild from "npm:esbuild@^0.24"

export const my_plugin: esbuild.Plugin = {
	name: "my-plugin",
	setup(build: esbuild.PluginBuild) {
		// do plugin related stuff.
	},
}
```

your new low-phat code:

```ts
import type * as esbuild from "jsr:@oazmi/esbuild-types@^0.24"

export const my_plugin: esbuild.Plugin = {
	name: "my-plugin",
	setup(build: esbuild.PluginBuild) {
		// do plugin related stuff.
	},
}
```

### internals

this package updates semi-autonomously via the [`./update.ts`](./update.ts) script.
and it uses weekly scheduled github actions to check for an update in `npm:esbuild`'s minor or major version,
to update and re-publish accordingly.

to manually bump to the next esbuild minor-version, simply execute the following command in your shell:

> deno task update-proj
npm package: @ob0/eslint-config-oblong
Description: ## Install
Author: Richard Stutfield
Latest version: 1.0.0

# Oblong ESLint Config

## Install

```bash
yarn add -D @ob0/eslint-config-oblong
```

## Configuration

Add a section to your package.json as below (no need to include an additional .eslintrc)

```javascript
"eslintConfig": {
  "extends":"@ob0/oblong"
}
```
npm package: @obaranovskyi/hb-angular-buttons
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.1.
Latest version: 0.0.212

# HbAngularButtons

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.1.

## Code scaffolding

Run `ng generate component component-name --project hb-angular-buttons` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project hb-angular-buttons`.
> Note: Don't forget to add `--project hb-angular-buttons` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build hb-angular-buttons` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build hb-angular-buttons`, go to the dist folder `cd dist/hb-angular-buttons` and run `npm publish`.

## Running unit tests

Run `ng test hb-angular-buttons` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @obarukbama/my-npm-package-demo
Description: Demo npm package for jsDelivr CDN
Latest version: 1.0.0

# my-npm-package-demo

ตัวอย่าง npm package ที่สามารถโหลดผ่าน jsDelivr ได้

## วิธีใช้

CDN ผ่าน jsDelivr:

```html
<script src="https://cdn.jsdelivr.net/npm/my-npm-package-demo@1.0.0/dist/mylib.min.js"></script>
npm package: @obasprom/char.ai
Description: An unofficial API wrapper for Character.AI
Author: Primi373-creator
Latest version: 0.0.1

# Character AI Unofficial API

> Node.js client for the unofficial [Character AI API](https://character.ai/).

## Intro

This is a Node.js client for the unofficial Character AI API. It is not affiliated with Character AI in any way. It is a community project. TS typings are included.

You can use it to start building projects powered by your CharacterAI entitites, like chatbots, websites, etc.

## Installation

```bash
npm install node-character.ai
```

Usage

```ts
// You can find this test script in the src folder
import CharacterAI from 'node-character.ai';

export class Test {
  public static async sendMessage(message: string): Promise<void> {
    const characterAi = new CharacterAI();
    // accessToken is required; keep reading for details.
    await characterAi.authenticate(process.env.CHARACTERAI_TOKEN);

    // you can find your characterId in the URL of a Character's chat page. Keep reading for details.
    const chat = await characterAi.continueOrCreateChat(
      process.env.CHARACTERAI_CHARID,
    );

    // send a message and wait for the response
    const response = await chat.sendAndAwaitResponse({
      message,
      singleReply: true, // if you want just what would show up in the chat, set this to true
    });

    // response can be either an array of possible responses or a single response
    console.log(response);
  }
}

Test.sendMessage('Greetings! What are your plans for today?');
```

## Access Token

This package requires a valid session token from Character AI. You can get one by logging in to your Character AI account and copying the value of the `accessToken` in the `localStorage` of your browser.

1. Open the Character AI website in your browser
2. Open the developer tools `F12` and go to the `Application` tab.
3. Go to the `Storage` section and click on `Local Storage`.
4. Look for the `@@auth0spajs@@::dyD3gE281MqgISG7FuIXYhL2WEknqZzv::https://auth0.character.ai/::openid profile email offline_access` key.
5. Open the body and copy the access token.

![Access Token](./assets/accessTokenExample.png)

## Character ID

You can find your character ID in the URL of a Character's chat page. For example, if you go to the chat page of the character `Test Character` you will see the URL `https://character.ai/chat/chat?char=5f7f9b9b9b9b9b9b9b9b9b9b`. The last part of the URL is the character ID:

![Character ID](./assets/charIdExample.png)
npm package: @obb871001/api-integration-sdk
Description: 集成API
Author: Your Name
Latest version: 1.0.367

# React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).

## Expanding the ESLint configuration

If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project.
npm package: @obboy/parter
Description: Promise based multipart parser
Author: m1m3@obboy
Latest version: 1.0.1


# Parter

A Promise based version of busboy


## Documentation

Parter uses busboy under the hood. In fact, parter is written to make busboy promise based.
To install parter, run

```bash
yarn add parter
```
or,

```bash
npm install parter
```

Now, you can import it and instantiate it,

```javascript
import parter from 'parter';

async function requestHandler(req, res){
    // other things
    const body = await parter(req);
    // other things
}
```
When we try to log body, we will get an object similar to this

```javascript
{
        fields:{
                name: <String>,
                value: <String>,
                info: <Object>
        },
        files:{
                name: <String>,
                content: <Buffer>,
                info: <Object>
        }
}
```

Notice, we pass in `req` as the first argument. The `req` we pass in must be an instance of
`IncomingMessage` from node `http` module or it can be an instance of `Request` constructor.

You can also pass in an abject as a second parameter. This object is to configure parter. 
As, parter uses `busboy`, this is the same configuration object you would pass
in busboy. But, you can, of course pass additional properties. 

```javascript
options.errorOnMoreFields = <Boolean>
options.errorOnMoreFiles = <Boolean>
options.errorOnMoreParts = <Boolean>
options.errorOnLargerFileSize = <Boolean>
```
- `errorOnMoreFields` 

        Whether to reject if `fieldsLimit` is emitted from busboy

- `errorOnMoreFiles` 

        Whether to reject if `filesLimit` is emitted from busboy

- `errorOnMoreParts`

        Whether to reject if `partsLimit` is emitted from busboy

- `errorOnLargerFileSize` 

        Whether to reject if `limit` is emitted from busboy.
        
## Authors

- [@mr-m1m3](https://www.github.com/mr-m1m3)
npm package: @obcode/templating
Description: Templating package for Obcode
Author: ty
Latest version: 0.2.0

# @obcode/templating

> Templating package for Obcode. export `StreamWriter` from
> [@yellicode/templating](https://github.com/yellicode/templating)

## Usage

```typescript
import {BufferWriter} from 'memstreams';
import {StreamWriter} from '@obcode/templating';

const stream = new BufferWriter();
const writer = new StreamWriter(stream);
writer.writeLine('Hello, world!');
console.log(stream.data.toString());
// =>
// "Hello, world![EOL]"
```
npm package: @obdesign/components
Description: 一个基于 Vue 3 和 Unocss 的组件库
Author: JUNER
Latest version: 0.1.1

# @obdesign/components

[![NPM Version](https://img.shields.io/npm/v/%40obdesign%2Fcomponents)](https://www.npmjs.com/package/obdesign)

 - `obdesign` 的组件包

> :bulb: 文档请看 [obdesign npm](https://www.npmjs.com/package/obdesign)
npm package: @obdesign/nuxt
Description: 一个基于 Vue 3 和 Unocss 的组件库，包含 Unocss 预设
Latest version: 0.1.1

# @obdesign/nuxt

[![NPM Version](https://img.shields.io/npm/v/obdesign)](https://www.npmjs.com/package/obdesign)

![obdesign](https://epnzyoseqqjwdazchdcw.supabase.co/storage/v1/object/public/project/design/design.webp)

一款基于 Vue 3 和 Unocss 的组件库，包含 Unocss 预设

> :bulb: **组件库官网正在制作中，预览版本：[o-b.design](https://www.o-b.design)**

## 快速入门

> :bulb: **本文档面向 Nuxt 项目，且仅介绍安装过程，如果需要安装 Vite 项目的版本，或者需要详细的文档，请看 [obdesign](https://www.npmjs.com/package/obdesign)**

### 1. 安装依赖

```bash
npm install @obdesign/nuxt
```

> :information_source: 在此之前, 需要确保项目正确安装了`unocss`和`@unocss/reset`。如果不知道如何安装，请您看这里 [Unocss Vite Plugin](https://unocss.dev/integrations/vite) 和 [Unocss Browser Style Reset](https://unocss.dev/guide/style-reset)

### 2. 配置预设

```ts
// uno.config.ts
import { defineConfig, presetUno } from 'unocss'
import obPreset from '@obdesign/preset' // 这里和普通vite项目有所不同

export default defineConfig({
  content: {
    pipeline: {
      include: [
        // the default
        /\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
        // 编写提取文件路径（重要！）
        /.*\/ob\/.*\.(js|ts|vue|mjs|cjs)/,
      ],
    },
  },
  presets: [
    presetUno(),
    obPreset(), // 将预设添加到这里
  ],
})
```

### 3. 注册模块
> :bulb: **@obdesign/nuxt 支持单独引入、和模块自动导包**

#### 3.1 单独引入

```vue
<script setup lang="ts">
import { ObButton } from '@obdesign/components' // 这里和普通vite项目有所不同
</script>

<template>
  <ObButton>hello</ObButton>
</template>
```

#### 3.2 模块自动导包（推荐）

```ts
// nuxt.config.ts
export default defineNuxtConfig({
  devtools: { enabled: true },
  // 注册模块
  modules: ['@unocss/nuxt', '@obdesign/nuxt'],
  // 为构建进行额外的编译
  build: { transpile: ['@obdesign/components'] },
  // 样式重置（无需另外导入其他重置文件）
  css: ['@unocss/reset/tailwind-compat.css'],
})
```

### 4. 使用组件
```vue
<template>
  <ObButton>按钮</ObButton>
  <ObLink>链接</ObLink>
  <ObSpin />
  ...
</template>
```
npm package: @obdesign/preset
Description: 一个 Unocss 预设
Author: JUNER
Latest version: 0.1.1

# @obdesign/preset

[![NPM Version](https://img.shields.io/npm/v/%40obdesign%2Fpreset)](https://www.npmjs.com/package/obdesign)

 - `obdesign` 的 `unocss` 预设

> :bulb: 文档请看 [obdesign](https://www.npmjs.com/package/obdesign)