open-index/open-npm huggingface dataset:
npm package: @mroc/ottype-basic-string
Description: Proof-of-concept of a very simple textual operational transformation (OP) type for ShareDB.
Author: Matthias Mayrock
Latest version: 1.0.5

# ottype-basic-string

This proof-of-concept implementation of a operational transformation (OT) type text is not meant to be used in production and just serves the authors desire to gain domain knowledge.

The API supports two operations: Insert and delete a single char in a text.

```
const type = require("@mroc/ottype-basic-string");

const state0 = "ABC";

const op0 = type.opInsert(1, "x");
const state1 = type.apply(state0, op0);
console.log(state1); // "AxBC";

const op1 = type.opDelete(1);
const state2 = type.apply(state1, op1);
console.log(state1); // "ABC";
```
npm package: @mroc/react-div-contenteditable
Description: A plain text div contentEditable with react hooks.
Author: MRoc
Latest version: 1.0.18

# React Div ContentEditable

The package provides a small functional React component for a content editable div limited to plain text (no formatting "bold", "italic", etc.).


# Installation

```
npm install @mroc/react-div-contenteditable
```


## Example

```
import DivContentEditable from "@mroc/react-div-contenteditable";

...
    <DivContentEditable
        value={text0}
        placeholder="Type here..."
        autoFocus={true}
        lastCaretRect={undefined}
        onClick={hndleClick}
        onInput={handleInput}
        onFocus={handleFocus}
        onFocusLost={handleFocusLost}
        onKeyDown={handleKeyDown}
        onKeyDown={handleKeyUp}
        onCopy={handleCopy}
        onCut={handleCut}
        onPaste={handlePaste}
    />
```
npm package: @mrocket/wize-api-client
Description: Wize Space API client
Author: k1ny
Latest version: 1.0.3

# @mrocket/wize-api-client

TypeScript-модели для работы с Wize Space API.

Пакет подходит, если вам нужны типы запросов и ответов Wize API в приложении, SDK-обвязке или интеграции.

## Установка

```bash
pnpm add @mrocket/wize-api-client
```

Или:

```bash
npm install @mrocket/wize-api-client
```

## Что экспортируется

Текущая версия пакета экспортирует:

- все generated-модели из Wize API
- тип `ApiClient`

Примеры доступных типов:

- `CreateTaskDto`
- `UpdateTaskDto`
- `TaskViewEntity`
- `UserMeEntity`
- `ProjectViewEntity`
- `BoardViewEntity`

## Использование

### Импорт типов

```ts
import type {
  CreateTaskDto,
  TaskViewEntity,
  UserMeEntity,
} from "@mrocket/wize-api-client";
```

### Использование в своем API-слое

```ts
import type { CreateTaskDto, TaskViewEntity } from "@mrocket/wize-api-client";

export async function createTask(
  payload: CreateTaskDto,
  token: string,
): Promise<TaskViewEntity> {
  const response = await fetch("https://wize.space/api/v1/tasks", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${token}`,
    },
    body: JSON.stringify(payload),
  });

  if (!response.ok) {
    throw new Error(`Request failed: ${response.status}`);
  }

  return response.json() as Promise<TaskViewEntity>;
}
```

## Для чего пакет удобен

- типизировать payload для запросов в Wize API
- типизировать ответы сервера
- переиспользовать DTO и entity без ручного описания интерфейсов
- держать клиентский код синхронизированным со схемой API

## Важно

В текущей версии корневой импорт пакета не экспортирует готовые API-классы вроде `UsersApi`, `TasksApi` или `ProjectsApi`. Для npm-пользователя этот пакет сейчас следует рассматривать как пакет типов и моделей для Wize API.

## Совместимость

- runtime: Node.js с поддержкой modern TypeScript toolchain
- формат пакета: CommonJS
- types included: да
npm package: @mrohyang/babel-plugin-ivcomponent
Description: 适用于开发 https://m.v.qq.com/txi/dev/ 组件的 babel plugin。
Author: mrohyang
Latest version: 2.0.0

# babel-plugin-ivcomponent

适用于开发 https://m.v.qq.com/txi/dev/ 组件的 babel plugin。

# 安装与使用

```sh
npm install @chenng/babel-plugin-ivcomponent -D
```

```js
// webpack.config.js
rules: [
  {
    test: /\.js$/,
    exclude: /node_modules/,
    use: {
      loader: 'babel-loader',
      options: {
        plugins: ['@chenng/babel-plugin-ivcomponent'], // 配置插件
        presets: ['@babel/preset-env'],
      }
    }
  }
]
```

# 本地调试

```sh
# 开发
comp="Bubble" npm run dev

# 打包
comp="Bubble" npm run build
```
npm package: @mrolaolu/helpers
Description: Super handy JavaScript utilities for frontend development.
Author: Olaolu Olawuyi
Latest version: 0.3.2

# [@mrolaolu/helpers](https://npm.im/@mrolaolu/helpers)

🛠 Super handy JavaScript utilities for frontend development.

**Note:** This is a work in progress and as such is not well documented or
ready-to-use.

## Install

```sh
$ npm install @mrolaolu/helpers --save
```

## Usage

Let's say you want to use the `getFormFields` helper...

```ts
import { getFormFields } from '@mrolaolu/helpers'
```

or ...

```ts
import getFormFields from '@mrolaolu/helpers/dist/esm/getFormFields'
```

```ts
const formFields = getFormFields(
  document.getElementById('form') as HTMLFormElement
)
// => { email: hello@test.io, password: Unicorns!, ... }
```

<!-- {p: style='display:none'} -->

> MIT © [olaolu.dev](https://olaolu.dev) &nbsp;&middot;&nbsp; GitHub
> [@whizkydee](https://github.com/whizkydee) &nbsp;&middot;&nbsp; Twitter
> [@mrolaolu](https://twitter.com/mrolaolu)

<!-- {blockquote: style='display:none'} -->
npm package: @mroth/homebridge-airmega
Description: Homebridge plugin for the Airmega air purifier
Author: Andrew Schaper
Latest version: 3.2.0-alpha.0

# homebridge-airmega

Control and monitor your Airmega purifier with HomeKit.

[![npm version](http://img.shields.io/npm/v/homebridge-airmega.svg)](https://npmjs.org/package/homebridge-airmega)

## Functionality

* Control power, fan speed, and lights
* Toggle between manual and auto mode
* Reports the current air quality
* Reports the life levels and change indication for the pre-filter and Max2 filter.

## Prerequisites

* Installation of [Homebridge](https://github.com/nfarina/homebridge)
* iOS 11 or later
* Airmega 400S or 300S connected to WiFi and registered with the IOCare app

## Installation

```
npm install -g homebridge-airmega
```

## Configuration

Add the following to your homebridge config:

```
"platforms": [
  {
    "platform": "Airmega",
    "username": "myusername",
    "password": "password123"
  }
]
```

### Excluding Accessories

You can optionally prevent certain accessories from being created by using the `exclude` option in your config (note: only the lightbulb accessory supports exclusion for now).

Example:

```
"platforms": [
  {
    "platform": "Airmega",
    "username": "myusername",
    "password": "password123",
    "exclude": [
      "lightbulb"
    ]
  }
]
```

### Authentication

The IOCare app offers two main options for logging in: "Phone Number/Email" or "Coway ID". The username and password you supply in the config has been tested to work with either one. This plugin currently does not support authentication through social networks.

## Tested Siri Commands

Example of some Siri commands you can use:

* "Turn on the air purifier"
* "Turn off the air purifier lights"
* "Set the air purifier to auto"
* "Set the air purifier fan to medium"
* "What's the air quality in \<room name\>?"
npm package: @mrothnet/textfile
Description: Reading and writing UTF-8 encoded textfiles
Author: Michael Roth
Latest version: 2.1.1

# Reading and writing UTF-8 encoded text files

Makes reading, saving and editing text files simple and more descriptive:

- Encoding is always UTF-8.
- Synchronous and asynchronous API.
- Typescript supported.

Differentiates between:

Read
: File must exists to be read.

Create
: File to be written is not allowed to exists already.

Write
: File to be written may exists already and gets overwritten in case.

Append
: File to be written may exists already and content is appended in case.

## Install

|               npm                |             yarn              |
| :------------------------------: | :---------------------------: |
| `npm install @mrothnet/textfile` | `yarn add @mrothnet/textfile` |

## Usage

### Asynchronous API (Promise)

#### Reading

```javascript
const { readTextFile } = require("@mrothnet/textfile");

// Read UTF-8 encoded text file
const content = await readTextFile("path/filename.txt");
```

#### Writing

```javascript
const { createTextFile, writeTextFile, appendTextFile } = require("@mrothnet/textfile");

// Create new text file (fails if file already exists)
await createTextFile("path/filename.txt", "Hello, World!");

// Replace or create text file
await writeTextFile("path/filename.txt", "New file content");

// Append to existing file or create new one
await appendTextFile("path/filename.txt", "This line will be appended\n");
```

#### Editing

```javascript
const { editTextFile } = require("@mrothnet/textfile");

// Edit an existing file with synchronous function
await editTextFile("path/filename.txt", (text) => {
  return text.toUpperCase();
});

// Edit an existing file with asynchronous function (Promise)
await editTextFile("path/filename.txt", (text) => {
  return new Promise((resolve) => {
    resolve(text.toLowerCase());
  });
});
```

### Synchronous API

#### Reading

```javascript
const { readTextFileSync } = require("@mrothnet/textfile");

// Read UTF-8 encoded text file
const content = readTextFileSync("path/filename.txt");
```

#### Writing

```javascript
const { createTextFileSync, writeTextFileSync, appendTextFileSync } = require("@mrothnet/textfile");

// Create new text file (fails if file already exists)
createTextFileSync("path/filename.txt", "Hello, World!");

// Replace or create text file
writeTextFileSync("path/filename.txt", "New file content");

// Append to existing file or create new one
appendTextFileSync("path/filename.txt", "This line will be appended\n");
```

#### Editing

```javascript
const { editTextFileSync } = require("@mrothnet/textfile");

// Edit an existing file (only synchronous)
editTextFileSync("path/filename.txt", (text) => {
  return text.toUpperCase();
});
```

## Contributing

Pull requests, patches, emails, and issues are welcomed!

## License

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

## Author

- [Michael Roth](https://mroth.net/) <[<mail@mroth.net>](mailto:mail@mroth.net)>