1.2.4 • Published 10 months ago

@hazae41/cursor v1.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
10 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.4

10 months ago

1.2.0

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.23

2 years ago

1.1.22

2 years ago

1.1.21

2 years ago

1.1.20

2 years ago

1.1.26

2 years ago

1.1.25

2 years ago

1.1.24

2 years ago

1.1.19

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.16

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago