# @hazae41/cursor

> Rust-like Cursor for TypeScript

Latest version **2.2.0** (published 2026-06-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hazae41/cursor
pnpm add @hazae41/cursor
yarn add @hazae41/cursor
bun add @hazae41/cursor
```

## Health

**Score 50/100 (C)** — status: active.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2026-06-03 |
| First published | 2023-04-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 20.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | hazae41 |
| Maintainers | hazae41 |
| Keywords | cursor, zero-copy, encoding, decoding, buffer, bytes, protocol, packets, reader, writer, offset, asn1, der, ber, octets, stream, low-level, alloc, allocation, allocator, typescript, esmodules, tested, unit-tested |

## Links

- npm: https://www.npmjs.com/package/@hazae41/cursor
- Repository: https://github.com/hazae41/cursor
- Homepage: https://github.com/hazae41/cursor#readme
- Issues: https://github.com/hazae41/cursor/issues
- npm.io page: https://npm.io/package/@hazae41/cursor

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 2.2.0 (latest) — 2026-06-03
- 2.1.4 — 2026-04-14
- 2.1.3 — 2025-11-16
- 2.1.2 — 2025-10-29
- 2.1.1 — 2025-10-25
- 2.1.0 — 2025-10-25
- 2.0.7 — 2025-08-15
- 2.0.6 — 2025-08-11
- 2.0.5 — 2025-07-02
- 2.0.4 — 2025-07-02
- 2.0.3 — 2025-06-30
- 2.0.2 — 2025-06-30
- 2.0.1 — 2025-06-30
- 2.0.0 — 2025-06-29
- 1.2.4 — 2024-08-31
- … 31 more at https://npm.io/package/@hazae41/cursor/versions

## README

# Cursor

Rust-like Cursor for TypeScript

```bash
npm install @hazae41/cursor
```

[**📦 NPM**](https://www.npmjs.com/package/@hazae41/cursor)

## Features

### Current features
- 100% TypeScript and ESM
- No external dependencies
- Zero-copy reading and writing
- Rust-like patterns
- Unit-tested

## Usage

### Cursor

#### Writing

```typescript
const cursor = new Cursor(new Uint8Array(1024))

cursor.writeUint8(123)
cursor.writeUint16(1234)

console.log(cursor.offset) // 3
```

#### Reading

```typescript
const cursor = new Cursor(new Uint8Array(/*...*/))

const uint8 = cursor.readUint8()
const uint16 = cursor.readUint16()

console.log(cursor.offset) // 3
```

---
_Source: https://npm.io/package/@hazae41/cursor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
