1.2.3 • Published 6 months ago

@hazae41/cursor v1.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Cursor

npm i @hazae41/cursor

Node Package 📦

Features

Current features

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

Usage

Cursor

Writing

const cursor = Cursor.allocUnsafe(1024)

cursor.tryWriteUint8(123).unwrap()
cursor.tryWriteUint16(1234).unwrap()

console.log(cursor.offset) // 3

Reading

const bytes = new Uint8Array(/*...*/)
const cursor = new Cursor(bytes)

const uint8 = cursor.tryReadUint8().unwrap()
const uint16 = cursor.tryReadUint16().unwrap()

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

6 months ago

1.2.3

6 months ago

1.2.2

6 months ago

1.2.1

6 months ago

1.1.23

9 months ago

1.1.22

9 months ago

1.1.21

9 months ago

1.1.20

9 months ago

1.1.26

8 months ago

1.1.25

8 months ago

1.1.24

9 months ago

1.1.19

11 months ago

1.1.18

11 months ago

1.1.17

12 months ago

1.1.16

12 months ago

1.1.14

12 months ago

1.1.13

12 months ago

1.1.12

12 months ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago