open-index/open-npm huggingface dataset:
npm package: @nick.telsan/eslint-config-preact
Description: Fork of eslint-config-preact
Author: The Preact Authors
Latest version: 1.3.1

# eslint-config-preact

An unopinionated baseline ESLint configuration for Preact and Preact CLI codebases.

It helps you avoid bugs, and lets you know when there's a more optimal way to do things.

✅ **What's included:** sensible defaults for modern JS, JSX, Preact, Jest and Mocha.

⛔️ **What's not included:** no stylistic or subjective rules are provided.

## Installation

Install eslint and this config:

```
npm i -D eslint eslint-config-preact
```

Now in your `package.json`:

````
{
  "eslintConfig": {
    "extends": "preact"
  }
}
````
npm package: @nick12003/utils
Description: a simple typescript library without any dependency lib
Author: Nick Chen
Latest version: 1.2.0

# utils

[![License](https://img.shields.io/github/license/nick12003/utils)](https://github.com/nick12003/utils/blob/main/LICENSE)

a simple typescript library without any dependency lib

## usage

### install

```shell
npm install @nick12003/utils
# or
yarn add @nick12003/utils
# or
pnpm add @nick12003/utils
```

### import

```js
// import common functions
import { ... } from '@nick12003/utils';
// import regex functions
import { ... } from '@nick12003/utils/regexHelpers';
```
npm package: @nick22985/authy-decryptor
Description: CLI tool to decrypt Authy encrypted authenticator backup tokens
Author: nick22985
Latest version: 0.4.0

# Authy Decryptor

A command-line tool to decrypt Authy authenticator backup tokens from either an encrypted JSON file or a minimal CSV export. This tool allows you to export your Authy tokens to other password managers or store them in a standard format.

## Features

- Decrypt Authy backups from encrypted JSON or minimal CSV files.
- Export decrypted tokens to various formats:
  - authy (default)
  - `aegis`
  - `ente`
  - `vaultwarden` (compatible with Vaultwarden/Bitwarden)
- Command-line interface for easy integration into scripts.
- Cross-platform support (Windows, macOS, and Linux).

## Installation

You can install the tool using npm:
Tou can download a pre-built executable for your operating system from the [releases page](https://github.com/nick22985/authy-decryptor/releases) or build it yourself

## Usage

The `authy-decryptor` CLI tool requires an input file, an output file, and an optional output schema.

```bash
authy-decryptor -i <input-file> -o <output-file> [options]
```

### Options

| Option                | Description                                     | Default |
| --------------------- | ----------------------------------------------- | ------- |
| `-i, --input <file>`  | Input file (.csv or .json)                      |         |
| `-o, --output <file>` | Output JSON file                                |         |
| `--schema <type>`     | Output schema format (aegis, ente, vaultwarden) | `authy` |
| `-p, --password <pw>` | Optional password for decryption                |         |

### Examples

#### Decrypting a CSV file

To decrypt a minimal CSV file and export it to the Vaultwarden format:

```bash
authy-decryptor -i my-authy-backup.csv -o decrypted-tokens.json --schema vaultwarden
```

#### Decrypting an Encrypted JSON File

To decrypt an encrypted JSON file using a password and export it to the Aegis format:

```bash
authy-decryptor -i my-encrypted-backup.json -o decrypted-tokens.json --schema aegis
```

## Building from Source

If you want to build the project from source, you'll need to have Node.js and npm installed.

1. **Clone the repository:**

   ```bash
   git clone https://github.com/nick22985/authy-decryptor.git
   cd authy-decryptor
   ```

2. **Install dependencies:**

   ```bash
   npm install
   ```

3. **Build the project:**

   ```bash
   npm run build
   ```

   This will create a bundled version of the CLI in the `dist` directory and a standalone executable in the `build` directory.

## Testing

To run the tests, use the following command:
This requires you to have a encrypted export of the GDPR data they send you or the MIT Proxy export refer to https://gist.github.com/gboudreau/94bb0c11a6209c82418d01a59d958c93 for ways of doing this

```bash
npm test
```

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
npm package: @nick22985/jb-hifi-autopilot-csv-cleanup
Description: Cleans up autopilot files sent from JBHIFI to be able to be upladed to educationstore
Author: nick22985
Latest version: 1.0.2

<h3 align="center">@nick22985/JBHiFiAutoPilotCSVCleanup</h3>

<div align="center">

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![GitHub Issues](https://img.shields.io/github/issues/nick22985/JBHiFiAutoPilotCSVCleanup.svg)](https://github.com/nick22985/JBHiFiAutoPilotCSVCleanup/issues)
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/nick22985/JBHiFiAutoPilotCSVCleanup.svg)](https://github.com/nick22985/JBHiFiAutoPilotCSVCleanup/pulls)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)
[![wakatime](https://wakatime.com/badge/github/nick22985/JBHiFiAutoPilotCSVCleanup.svg)](https://wakatime.com/badge/github/nick22985/JBHiFiAutoPilotCSVCleanup)

</div>

---

<p align="center">CLI to clean up Jb Auto Pilot csv files
    <br>
</p>

## 📝 Table of Contents

- [About](#about)
- [Getting Started](#getting_started)
- [Usage](#usage)
- [Contributing](../CONTRIBUTING.md)

## 🧐 About <a name = "about"></a>

This CLI takes the jbhifi autopilot files and gets rid of the blank columns they put in the file making them able to be uploaded to the microsoft device management portals

## 🏁 Getting Started <a name = "getting_started"></a>

npm package https://www.npmjs.com/package/@nick22985/JBHiFiAutoPilotCSVCleanup

### Prerequisites

What things you need to install the software and how to install them.

```
nodeJs (https://nodejs.org/en/)
```

### Installing

A step by step series of examples that tell you how to get a development env running.

You can install the cli by doing npm i -g @nick22985/JBHiFiAutoPilotCSVCleanup. Then it will be accesable by doing jb/jbapcleanup/apcleanup

```
jb
```

This will create a folder in the same directory called out and convert all csv files with autopilot in the name

### Command Alliases

jb
jbapcleanup
apcleanup

## 🎈 Usage <a name="usage"></a>

```
jb
```

## ⛏️ Built Using <a name = "built_using"></a>

- [NodeJs](https://nodejs.org/en/) - Server Environment

## ✍️ Authors <a name = "authors"></a>

- [@nick22985](https://github.com/nick22985) - Idea & Initial work
npm package: @nick22985/mclogcleanup
Description: CLI to clean up log files from minecraft java server
Author: nick22985
Latest version: 1.1.0

<h3 align="center">@nick22985/mclogcleanup</h3>

<div align="center">

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![GitHub Issues](https://img.shields.io/github/issues/nick22985/mclogcleanup.svg)](https://github.com/nick22985/mclogcleanup/issues)
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/nick22985/mclogcleanup.svg)](https://github.com/nick22985/mclogcleanup/pulls)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)
[![wakatime](https://wakatime.com/badge/github/nick22985/mcLogCleanUp.svg)](https://wakatime.com/badge/github/nick22985/mcLogCleanUp)

</div>

---

<p align="center">CLI to clean up log files from minecraft java server.
    <br>
</p>

## 📝 Table of Contents

- [About](#about)
- [Getting Started](#getting_started)
- [Usage](#usage)
- [Contributing](../CONTRIBUTING.md)

## 🧐 About <a name = "about"></a>

This CLI takes minecraft log files and cleans them up. It removes all the error and leaves pure chat. It also get rid of all the annoying colour codes and hex codes in the text so it is readable to a human

## 🏁 Getting Started <a name = "getting_started"></a>

npm package https://www.npmjs.com/package/@nick22985/mclogcleanup

### Prerequisites

What things you need to install the software and how to install them.

```
nodeJs (https://nodejs.org/en/)
```

### Installing

A step by step series of examples that tell you how to get a development env running.

You can install the cli by doing npm i -g @nick22985/mclogcleanup. Then it will be accesable by doing mcmclogcleanup -p {logFile path}

```
mcmclogcleanup -p ./log.log
```

This will create a file in the same directory as the log file called name_cleanup.log.

```
mcmclogcleanup -p ./log.log

Will create a file called

./log_cleaned.log
```

### Command Alliases
mclog
mcCleanup


## 🎈 Usage <a name="usage"></a>

```
mcmclogcleanup -p {logFile path}
```

## ⛏️ Built Using <a name = "built_using"></a>

- [NodeJs](https://nodejs.org/en/) - Server Environment

## ✍️ Authors <a name = "authors"></a>

- [@nick22985](https://github.com/nick22985) - Idea & Initial work
npm package: @nick403/codexwebui
Description: A secure web interface for Codex app-server, designed for local-first and remote browser access
Author: Pavel Voronin, Igor Levochkin
Latest version: 0.3.3

# codexwebui

一个面向 Codex app-server 的本地优先 Web UI，支持局域网访问、多 host 管理和同页分屏。

## 特性

- `npx @nick403/codexwebui` 一条命令启动
- 支持 `-d` 后台常驻运行
- 支持局域网访问和密码保护
- 支持同一前端接入多个局域网内 `codexwebui` host
- 支持最多 4 个 session 同页分屏
- 支持不同 host 的 session 在同一页面分屏显示
- 支持显示/隐藏思考过程
- 支持长会话分段加载和日期分组

## 快速开始

本机启动：

```bash
npx @nick403/codexwebui
```

局域网启动：

```bash
npx @nick403/codexwebui --host 0.0.0.0
```

后台运行：

```bash
npx @nick403/codexwebui -d --host 0.0.0.0
```

默认地址：

```text
http://127.0.0.1:5999
```

## 多主机使用

如果你希望在同一个 Web 前端里接入多个局域网内的 Codex 节点：

1. 在每台机器上都运行 `codexwebui`
2. 在主页面左侧 `Host` 区域添加其他机器的地址和密码
3. 在侧栏选择 session，或使用 `Open in new pane`
4. 在空白 pane 中直接切换 `Target host`

推荐启动方式：

```bash
npx @nick403/codexwebui -d --host 0.0.0.0 --port 6100
```

## 分屏说明

- 顶部 `1 / 2 / 3 / 4` 可切换布局
- 每个 pane 都有独立的 `host + session`
- 侧栏 session 菜单支持 `Open in new pane`
- 空白 pane 可直接指定 `Target host`
- pane 头部可使用 `Browse host` 快速切到该 host 的 session 浏览上下文

## 运行要求

- Node.js 18+
- 可用的 `codex` CLI
- 已完成 Codex 登录

## 常用参数

```bash
npx @nick403/codexwebui --help
```

- `--port <port>`：监听端口，默认 `5999`
- `--host <host>`：监听地址，默认 `127.0.0.1`
- `--password <pass>`：指定访问密码
- `--no-password`：关闭密码保护
- `--tunnel`：启动 cloudflared 隧道
- `--no-tunnel`：关闭 cloudflared 隧道
- `-d, --detach`：后台运行 codexwebui

## 发布后安装

包发布到 npm 后，可直接在其他机器运行：

```bash
npx @nick403/codexwebui
```

或者：

```bash
npx @nick403/codexwebui -d --host 0.0.0.0
```

## 安全说明

- 默认开启密码保护
- 默认仅监听 `127.0.0.1`
- 建议只在明确需要远程访问时使用 `--host 0.0.0.0`
npm package: @nick4fake/react-draft-wysiwyg
Description: A wysiwyg on top of DraftJS.
Author: Jyoti Puri
Latest version: 1.15.1

# React Draft Wysiwyg

A Wysiwyg editor built using ReactJS and DraftJS libraries.
[Demo Page](https://jpuri.github.io/react-draft-wysiwyg).

[![Build Status](https://travis-ci.org/jpuri/react-draft-wysiwyg.svg?branch=master)](https://travis-ci.org/jpuri/react-draft-wysiwyg)

![](http://i.imgur.com/tU7kJ6i.gif)

## Features
- Configurable toolbar with option to add/remove controls.
- Option to change the order of the controls in the toolbar.
- Option to add custom controls to the toolbar.
- Option to change styles and icons in the toolbar.
- Option to show toolbar only when editor is focused.
- Support for inline styles: Bold, Italic, Underline, StrikeThrough, Code, Subscript, Superscript.
- Support for block types: Paragraph, H1 - H6, Blockquote, Code.
- Support for setting font-size and font-family.
- Support for ordered / unordered lists and indenting.
- Support for text-alignment.
- Support for coloring text or background.
- Support for adding / editing links
- Choice of more than 150 emojis.
- Support for mentions.
- Support for hashtags.
- Support for adding / uploading images.
- Support for aligning images, setting height, width.
- Support for Embedded links, flexibility to set height and width.
- Option provided to remove added styling.
- Option of undo and redo.
- Configurable behavior for RTL and Spellcheck.
- Support for placeholder.
- Support for WAI-ARIA Support attributes
- Using editor as controlled or un-controlled React component.
- Support to convert Editor Content to HTML, JSON, Markdown.
- Support to convert the HTML generated by the editor back to editor content.
- Support for internationalization.

## Installing
The package can be installed from npm `react-draft-wysiwyg`

```
$ npm install --save react-draft-wysiwyg draft-js
```

## Getting started
Editor can be used as simple React Component:
```js
import { Editor } from 'react-draft-wysiwyg';
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
<Editor
  editorState={editorState}
  toolbarClassName="toolbarClassName"
  wrapperClassName="wrapperClassName"
  editorClassName="editorClassName"
  onEditorStateChange={this.onEditorStateChange}
/>
```

## Docs
For more documentation check [here](https://jpuri.github.io/react-draft-wysiwyg/#/docs?_k=jjqinp).

## Questions Discussions
For discussions join public channel #rd_wysiwyg in [DraftJS Slack Organization](https://draftjs.herokuapp.com/).

## Thanks
Original motivation and sponsorship for this work came from [iPaoo](http://www.ipaoo.com/). I am thankful to them for allowing the Editor to be open-sourced.

## License
MIT.
npm package: @nick848/sf-cli
Description: AI-driven CLI tool for frontend development automation
Latest version: 2.0.28

# sf-cli

AI 驱动的前端开发 CLI 工具，通过自动学习项目业务和技术规范，实现需求到代码的自动化工作流。

## 安装

```bash
npm install -g @nick848/sf-cli
```

## 快速开始

```bash
# 启动 CLI
sf-cli
# 或
sfa
```

## 环境变量配置

在使用前，需要配置至少一个 AI 模型的 API Key：

```bash
# 智谱 GLM（推荐）
export GLM_API_KEY=your_glm_api_key

# OpenAI
export OPENAI_API_KEY=your_openai_api_key

# Claude
export ANTHROPIC_API_KEY=your_anthropic_api_key

# DeepSeek
export DEEPSEEK_API_KEY=your_deepseek_api_key

# 通义千问
export QWEN_API_KEY=your_qwen_api_key

# Kimi
export KIMI_API_KEY=your_kimi_api_key
```

## 命令说明

### 基础命令

| 命令 | 说明 |
|------|------|
| `/init` | 初始化项目，生成 AGENTS.md 及模板文档 |
| `/new <需求描述>` | 启动新的开发工作流 |
| `/apply [变更ID]` | 提交当前变更进入开发阶段 |
| `/archive [变更ID]` | 归档已完成的变更 |
| `/undo` | 撤销当前变更的所有修改 |
| `/update` | 更新 CLI 版本 |
| `/learn` | 学习并更新代码规范 |
| `/model` | 切换或配置 AI 模型 |
| `/help [命令]` | 显示帮助信息 |
| `/exit` | 退出 CLI |

### Skill 技能

Skill 是赋能当前 Agent 执行某项任务的能力，共享所有上下文：

```bash
#code requirement="实现登录功能" language="typescript"
#review files=["src/auth.ts", "src/login.ts"]
```

### SubAgent 子代理

SubAgent 独立完成任务，有独立上下文：

```bash
$code 实现用户登录功能
$review 审核当前变更的代码质量
```

### 文件引用

使用 `@` 符号引用文件：

```bash
@src/index.ts
@src/utils/helper.ts:42
@src/components/Button.tsx:15:10
```

## 工作流

sf-cli 采用 9 步工作流实现需求到代码的自动化：

```
Step 1: 需求分析
   ↓
Step 2: 架构设计
   ↓
Step 3: BDD 场景拆解
   ↓
Step 4: OpenSpec 规格生成 ← 需要用户确认
   ↓
Step 5: 测试用例生成
   ↓
Step 6: 代码实现
   ↓
Step 7: 代码审核
   ↓
Step 8: 代码测试 ← 需要用户确认
   ↓
Step 9: 文档更新 ← 需要用户确认
   ↓
归档
```

## 项目结构

初始化后，项目会生成以下目录结构：

```
.sf-cli/
├── AGENTS.md       # 工程入口文档
├── prod.md         # 业务描述文档
├── arch.md         # 架构文档
├── learn/          # 学习记录
│   └── dialog.json
├── skills/         # 自定义技能
├── agents/         # 自定义 SubAgent
└── state/          # CLI 状态

openspec/
├── config.yaml     # 开发规范配置
├── spec/           # 规格文档
└── changes/        # 变更文档
```

## 支持的模型

| 模型 | 说明 |
|------|------|
| GLM-5 | 智谱 GLM 系列 |
| OpenAI | GPT-4o / GPT-4-turbo / GPT-3.5-turbo |
| Claude | Claude 3.5 Sonnet / Opus / Haiku |
| DeepSeek | DeepSeek Coder / Chat |
| Qwen | 通义千问 Max / Plus / Turbo |
| Kimi | Moonshot Kimi 8k / 32k / 128k |

## MCP 服务集成

sf-cli 预装以下 MCP 服务：

- **语雀** - 获取产品 PRD 文档
- **Figma** - 获取设计稿信息
- **蓝湖** - 获取设计稿和切图

配置 MCP 凭证：

```bash
# 在 .sf-cli/config.yaml 中配置
mcp:
  yuque:
    token: your_yuque_token
  figma:
    token: your_figma_token
  lanhu:
    token: your_lanhu_token
```

## 开发

```bash
# 克隆仓库
git clone <repo-url>
cd superFrontend

# 安装依赖
npm install

# 构建
npm run build

# 开发模式
npm run dev

# 运行测试
npm test
```

## License

MIT
npm package: @nick_cn/image-masker
Description: ![GitHub](https://img.shields.io/github/license/NickWangCN/image-masker) ![npm](https://img.shields.io/npm/v/@nick_cn/image-masker) ![GitHub last commit](https://img.shields.io/github/last-commit/NickWangCN/image-masker)
Author: nick_cn
Latest version: 1.5.1

# Image Masker

![GitHub](https://img.shields.io/github/license/NickWangCN/image-masker)
![npm](https://img.shields.io/npm/v/@nick_cn/image-masker)
![GitHub last commit](https://img.shields.io/github/last-commit/NickWangCN/image-masker)

一个用于图片遮罩的工具组件。支持自由绘制、矩形、椭圆等多种遮罩方式，并提供撤销、重做等功能。

## 安装

```bash
npm install @nick_cn/image-masker
```

## 示例

👉 [在线体验 Demo](https://nickwangcn.github.io/image-masker/example)

完整的示例代码可以在 [GitHub](https://github.com/NickWangCN/image-masker/tree/main/src/example) 查看。

## API

### 初始化选项

| 参数          | 类型             | 必填 | 描述                       |
| ------------- | ---------------- | ---- | -------------------------- |
| parentElement | string           | 是   | 容器元素的 ID              |
| image         | HTMLImageElement | 是   | 要处理的图片实例           |
| padding       | string           | 否   | 容器内边距，默认为'4px'    |
| background    | string           | 否   | 容器背景颜色，默认为'#000' |

### 实例属性

| 属性      | 类型                       | 描述                                      |
| --------- | -------------------------- | ----------------------------------------- |
| mode      | 'draw' \| 'erase'          | 设置操作模式：涂抹或擦除                  |
| shape     | 'free' \| 'rect' \| 'oval' | 设置绘制形状：自由、矩形、椭圆            |
| brushSize | number                     | 设置画笔大小，默认为 5                    |
| color     | string                     | 设置画笔颜色，默认为 'rgba(255, 0, 0, 1)' |

### 实例方法

| 方法                 | 返回值                | 描述                     |
| -------------------- | --------------------- | ------------------------ |
| undo()               | void                  | 撤销上一步操作           |
| redo()               | void                  | 重做上一步操作           |
| maskLayerToDataURL() | Promise&lt;string&gt; | 获取遮罩层的图片数据 URL |
| toDataURL()          | Promise&lt;string&gt; | 获取处理后的图片数据 URL |

## 浏览器支持

- Chrome
- Firefox
- Safari
- Edge

## 许可证

MIT © [nickw_cn](mailto:nickw_cn@163.com)
npm package: @nick_muellner/shuffle-array
Description: A small library that takes an array as input and returns a new array that is shuffled.
Author: Nick Müllner
Latest version: 0.2.0

# @yourusername/shuffle-array (Class 2 Example)

> A small library that takes an array as input and returns a new array that is shuffled.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
   - [Examples](#examples)
- [Contribution](#contribution)
- [Security](#security)
- [License](#license)

## Installation

Install via npm:

```bash
npm install @yourusername/shuffle-array
```
Install via yarn:

```bash
yarn add @yourusername/shuffle-array
```

## Usage

Basic Usage

```js
import shuffleArray from '@yourusername/shuffle-array';

const startArray = [1, 2, 3, 4, 5];
const newShuffledArray = shuffleArray(startArray);

console.log(startArray);       // e.g., [1, 2, 3, 4, 5]
console.log(newShuffledArray); // e.g., [3, 1, 5, 2, 4]
```

### Examples

Shuffle a list of user IDs:

```js
import shuffleArray from '@yourusername/shuffle-array';

const userIds = ['u1', 'u2', 'u3', 'u4'];
const randomizedOrderOfUserIds = shuffleArray(userIds);

console.log(randomizedOrderOfUserIds); // e.g., ['u1', 'u3', 'u4', 'u2']
```

Use in a game for randomizing cards:

```js
import shuffleArray from '@yourusername/shuffle-array';

const deck = ['Ace of Spades', 'Two of Hearts']; // some card deck
const shuffledDeck = shuffleArray(deck);

console.log(shuffledDeck); // e.g., ['Two of Hearts', 'Ace of Spades', ...]
```

## Contribution

Contributions are welcome! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for more details.

## Security

Please refer to our [SECURITY.md](./SECURITY.md) for information about our security policies, how to report vulnerabilities, and our approach to handling security concerns.

**Important Note**: This library uses non-cryptographic randomness (`Math.random()`). Do not rely on it for security-critical functionality.

## License

This project is licensed under the [MIT License](./LICENSE.md).
npm package: @nick_muellner/string-toolkit
Description: > This library helps with generating strong random passwords or checking their safety.
Latest version: 1.0.4

# @nick_muellner/password-utilities

> This library helps with generating strong random passwords or checking their safety.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
   - [Examples](#examples)
- [Contribution](#contribution)
- [Security](#security)
- [License](#license)

## Installation

Install via npm:

```bash
npm install @nick_muellner/password-utilities
```
Install via yarn:

```bash
yarn add @nick_muellner/password-utilities
```

## Usage

Basic Usage

```js
import { generateStrongPassword, isStrongPassword } from '@nick_muellner/password-utilities';

const length = 12;
const safePassword = generateStrongPassword(length);

console.log(safePassword);                      // e.g. "pC%mD8TpCKn2"
console.log(isStrongPassword(safePassword))     // e.g. true
```

### Examples

Generate strong passwords with `isStrongPassword()`

```js
import { generateStrongPassword, isStrongPassword } from '@nick_muellner/password-utilities';

const length1 = 1;
const length2 = 12;

console.log(generateStrongPassword(length1)); // e.g. "pC%mD8Tp"
console.log(generateStrongPassword(length2)); // e.g. "pC%mD8TpCKn2"
```

Check safety of password:

```js
import { generateStrongPassword, isStrongPassword } from '@nick_muellner/password-utilities';

const password1 = "Hello World"
const password2 = "pC%mD8TpCKn2"

console.log(isStrongPassword(password1)); // e.g. false
console.log(isStrongPassword(password2)); // e.g. true
```

## Contribution

Contributions are welcome! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for more details.

## Security

Please refer to our [SECURITY.md](./SECURITY.md) for information about our security policies, how to report vulnerabilities, and our approach to handling security concerns.

**Important Note**: This library uses non-cryptographic randomness (`Math.random()`). Do not rely on it for security-critical functionality.

## License

This project is licensed under the [MIT License](./LICENSE.md).
npm package: @nickadam/kv
Description: A node key value store backed by sqlite that supports expiring keys
Author: Nick Vissari
Latest version: 1.1.9

# @nickadam/kv [![Build Status](https://github.com/nickadam/kv/actions/workflows/build.yml/badge.svg)](https://github.com/nickadam/kv/actions/workflows/build.yml?query=branch%3Amain)
A simple key value database backed by sqlite3

# Features
- Auto-expiring entries
- Wildcard matching
- Synchronous and asynchronous formats
- In-memory database (great for testing)
- Store and retrieve native objects (no need to serialize)

# Installation

```bash
npm install @nickadam/kv
```

# Usage

### Examples

Sync

```js
const kv = require('@nickadam/kv')('/path/to/file.db')

kv.set('mykey', {stuff: 'things'})

const data = kv.get('mykey')

console.log(data) // {stuff: 'things'}

kv.quit()
```

Async

```js
const kv = require('@nickadam/kv')('/path/to/file.db')

kv.set('mykey', {stuff: 'things'}, err => {
  if(err) return err

  kv.get('mykey', (err, data) => {
    kv.quit()

    console.log(data) // {stuff: 'things'}
  })
})
```

Set entries to expire using the `ttl` option.

```js
kv.set('mykey', {stuff: 'things'}, {ttl: 10}) // expires in 10 seconds
```

Get a list of values matching keys with the wildcard `*`.

```js
kv.set('mykey', {stuff: 'things'})

kv.set('yourkey', 100)

const data = kv.get('*key')

console.log(data) // [{stuff: 'things'}, 100]
```

Get the metadata associated with entries using the `metadata` option.

```js
kv.set('mykey', {stuff: 'things'})

const data = kv.get('mykey', {metadata: true})

console.log(data)
/*
{
  k: 'mykey',
  v: { stuff: 'things' },
  ttl: -1,
  timestamp: '2021-06-06 12:27:58'
}
*/
```

Delete entries

```js
kv.del('mykey')
```

```js
kv.del('mykey', err => {
  // check err and do stuff
})
```

Use an ephemeral in-memory database with the path `:memory:`

```js
const kv = require('@nickadam/kv')(':memory:')
```

# More information

`*` are not permitted in key names.

Expired entries are deleted at startup. For long running applications, a background job will delete expired entries once a minute - so long as you do not execute `kv.quit()`. Expired entries that have not yet been deleted will not return.

Values are encoded and decoded using `JSON.stringify` and `JSON.parse`.

This database was built using these amazing projects:
- [better-sqlite3](https://www.npmjs.com/package/better-sqlite3)
- [cron](https://www.npmjs.com/package/cron)
npm package: @nickardson/gatsby-source-printful
Description: Gatsby source plugin for pulling product and variant data from Printful
Author: Jonathan Steele
Latest version: 1.1.0

# gatsby-source-printful

👕 Gatsby source plugin for pulling product and variant data from [Printful](https://printful.com)

• [Demo](https://gatsby-source-printful.now.sh)

## Install

```sh
yarn add gatsby-source-printful
```

## How to use

```js
// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-source-printful`,
    options: {
      apiKey: '...',
      paginationLimit: 100 // Default value is 20
    },
  },
],
```