rxwa
v1.0.0
Published
A lightweight utility library that converts modern Web APIs—such as Web Serial, Web USB, Web Bluetooth, and more—into RxJS-based observable streams. Simplify event handling, device communication, and asynchronous workflows with clean, reactive primitives.
Readme
RXWA
RXWA is a lightweight, modern, and fully TypeScript-based library that wraps the Web API's as RxJS Observables. It converts SignalR’s Promise-based and callback-based API into a reactive, composable model.
Installation
npm install rxwaUsage
import { BaseSerialPort } from "rxwa";
export class XCardReaderAndWriter extends BaseSerialPort {
writeMode() {
const command = new Uint8Array([...])
return this.write(command)
}
readCard() {
return this.read()
.pipe(
// mapping
// flows
// etc.
)
}
}