open-index/open-npm huggingface dataset:
npm package: @imgsplit/cli
Description: Command-line tool for ImgSplit
Author: h1ve2
Latest version: 0.0.1

# @imgsplit/cli
<p style="text-align:center;" align="center">
    <picture align="center">
        <img align="center" alt="ImgSplit" width="200" src="https://imgsplit.github.io/images/cli.png" />
    </picture>
    <div align="center" style="margin-top: -20px">
        <h3>Command-line tool for ImgSplit</h3>
        <p>easily split large images</p>
    </div>
</p>

## Install
```bash [npm]
npm install -g @imgsplit/cli
```

## Usage
### Split by Height
Split an image into sections of 256px height (output to default directory):
```bash
imgsplit ./xxx.png --height 256
```
Specify a custom output directory:
```bash
imgsplit ./xxx.png --height 256 ./savepath/
```
### Split by Count
Divide an image into 10 equal parts (output to default directory):
```bash
imgsplit ./xxx.png --count 10
```
### Split by Custom Regions
Define specific regions using `x,y,width,height` coordinates (output to default directory):
```bash
imgsplit ./xxx.png --item 0,0,512,512 --item 0,512,512,256
```
Example coordinates:

`0,0,512,512`: Starts at top-left corner (0,0), creates a 512x512 section

`0,512,512,256`: Starts at (0,512), creates a 512x256 section


## Coordinate Format:
The --item flag supports three parameter patterns:

### 1. Vertical Splits with Dynamic Height
`--item <y>`
- First to second-last y: Height = `next_y - current_y`
- Last y: Height = `total_image_height - current_y`
- Example:  
  For an image with height 4096px:  
  `imgsplit ./xxx.png --item 512 --item 1024`
  
  1. Region 1:
     - Start: Y=512
     - Height: 1024 - 512 = 512px
     - Covers Y=512 to Y=1024
  2. Region 2:
     - Start: Y=1024
     - Height: 4096 - 1024 = 3072px
     - Covers Y=1024 to Y=4096
### 2. Height-Based Region
`--item <y>,<height>`

- Defines a region starting at y with the specified height (full width used).
- Example: `--item 200,100` → Creates a 100px-tall region starting at Y=200.

### 3. Custom Rectangle
`--item <x>,<y>,<width>,<height>`

- Defines a rectangle region with explicit coordinates.
- Example: `--item 50,100,400,300` → Starts at (50,100), creates a 400x300 region.
---

## Key Notes:

- Default output directory: `./${imgname}-splitted/` (automatically created if missing)
- Supported image formats: PNG, JPG. (Other formats will be automatically saved as PNG)
- Use --help to see all options:`imgsplit --help`
npm package: @imgsplit/core
Description: An image splitter
Author: h1ve2
Latest version: 0.1.2

# ImgSplit
<p style="text-align:center;" align="center">
    <picture align="center">
        <img align="center" alt="ImgSplit" width="200" src="https://imgsplit.github.io/images/pic.png" />
    </picture>
    <div align="center" style="margin-top: -20px">
        <h3>图片分割器</h3>
        <p>轻松分割长图</p>
    </div>
</p>

[English](./README.md)

- [指南](https://imgsplit.github.io/zh/guide/)
- [API](https://imgsplit.github.io/zh/api/)
- [示例](https://imgsplit.github.io/zh/guide/#示例)


## 安装
```bash [npm]
npm i @imgsplit/core
```
or
```bash [yarn]
yarn add @imgsplit/core
```

## 使用
```ts
import {imgsplit} from "@imgsplit/core";

const result = await imgsplit(
    'https://imgsplit.github.io/images/example.png',
    256
);

for (let i = 0; i < result.length; i++) {
    const {
        x, y,
        width, height,
        dataURL
    } = result[i];

    // ...

}
```
npm package: @imguilherme/nullchecker
Description: This library was created in order to avoid tedious null-check validations in js language.
Latest version: 0.1.0
Deprecated: this package has been deprecated

# Nullchecker 0.1.0

This library was created in order to avoid tedious null-check validations in js language.

**Contributors**

 - [Marcelo Junior](https://github.com/marceloadsj)

# Installation

**Yarn**

    $ yarn install nullchecker

**Npm**

    $ npm install nullchecker

# Sample usage

    let  person  = {
        name "Guilherme Costa",
        document: {
           type: "CPF",
           value: "08002424913"
        }
    }

    const _ = require("nullchecker"); 
    
    let name = _.get("document.value", person, "");
    console.log(name);
    // Guilherme Costa
    
    let invalidProperty = _.get("document.type.kind", person, "default value");
    console.log(invalidProperty);
    // default value
npm package: @imhanxi/sproto-js
Description: TypeScript refactor of hanxi/sproto-js with ESM support
Author: hanxi
Latest version: 0.1.9

# sproto-js

一个用于 JavaScript/TypeScript 的 sproto 协议库，这是原版 [zhangshiqian1214/sproto-js](https://github.com/zhangshiqian1214/sproto-js) 的 TypeScript 重构版本。

## 简介

sproto 是一个轻量级的二进制协议，类似于 Google Protocol Buffers，但更加简洁。本库提供了在 TypeScript 环境中使用 sproto 协议的完整实现。

## 特性

- 🚀 **TypeScript 支持**：完整的类型定义和类型安全
- 📦 **轻量级**：无外部依赖，体积小巧
- 🔧 **易于使用**：简单的 API 设计
- 🎯 **高性能**：优化的编解码算法
- 🌐 **跨平台**：支持 Node.js 和浏览器环境

## 安装

```bash
bun add @imhanxi/sproto-js
```

或使用 npm：

```bash
npm install @imhanxi/sproto-js
```

## 快速开始

### 1. 定义协议文件

创建 `.sproto` 文件定义你的协议结构：

```sproto
# proto/login.sproto
.context {
    rid 0 : integer
    proto_checksum 1 : string
}

login 101 {
    request {
        token 0 : string
        ctx 1 : context
    }
    response {
        code 0 : integer
        account 1 : string
        gamenode 2 : string
    }
}
```

### 2. 编译协议文件

将 `.sproto` 文件编译成 `.spb` 二进制文件（需要 sproto 编译器）。

### 3. 使用示例

```typescript
import fs from "fs";
import sproto from "@imhanxi/sproto-js";

// 读取编译后的协议文件
const bundle = new Uint8Array(fs.readFileSync("./protocol.spb"));

// 创建 sproto 实例
const sp = sproto.createNew(bundle);

// 创建主机实例
const client = sp.host("base.package");
const clientRequest = client.attach(sp);

// 编码请求数据
const data = {
    token: "your-jwt-token",
    ctx: {
        proto_checksum: "xxxxx",
    },
};

const req = clientRequest("login.login", data);
console.log("编码后的请求数据长度:", req.length);

// 解码响应数据
const ret = client.dispatch(req);
console.log("解码结果:", ret);
```

## API 文档

### sproto.createNew(bundle: Uint8Array)

从编译后的协议文件创建 sproto 实例。

**参数:**
- `bundle`: 编译后的 `.spb` 文件内容

**返回值:**
- `SprotoInstance`: sproto 实例对象

### instance.host(packageName?: string)

创建协议主机实例。

**参数:**
- `packageName`: 包名（可选）

**返回值:**
- `SprotoHost`: 主机实例

### host.attach(sp: SprotoInstance)

创建请求编码函数。

**参数:**
- `sp`: sproto 实例

**返回值:**
- 编码函数：`(name: string, args: object) => Uint8Array`

### host.dispatch(buffer: Uint8Array)

解码接收到的数据包。

**参数:**
- `buffer`: 要解码的数据包

**返回值:**
- 解码后的对象

## 支持的数据类型

| 类型 | 描述 |
|------|------|
| **string** | 字符串类型 |
| **binary** | 二进制字符串（字符串的子类型） |
| **integer** | 整数，最大长度为有符号 52 位（符合 IEEE 754 标准） |
| **double** | 双精度浮点数，符合 [IEEE 754 标准](https://en.wikipedia.org/wiki/Double-precision_floating-point_format) |
| **boolean** | 布尔值：true 或 false |

## 项目结构

```
sproto-js/
├── src/
│   └── sproto.ts          # 主要实现文件
├── proto/
│   ├── base.sproto        # 基础协议定义
│   └── login.sproto       # 登录协议定义
├── test.ts                # 使用示例
├── package.json
└── README.md
```

## 开发

### 构建项目

```bash
bun run build
```

### 运行测试

```bash
bun run test.ts
```

### 代码检查

```bash
bunx tsc -p tsconfig.json
```

## 许可证

MIT License

## 贡献

欢迎提交 Issue 和 Pull Request！

## 相关链接

- [GitHub 仓库](https://github.com/hanxi/sproto-js)
- [问题反馈](https://github.com/hanxi/sproto-js/issues)
- [sproto 协议规范](https://github.com/cloudwu/sproto)