A simple, light and fast bytebuffer implementation under node.js
Install the package:
npm i buffer.ws
Importing the package with require:
var BufferWS = require("buffer.ws");
or with import:
import { BufferWS } from 'buffer.ws';
Example:
var BufferWS = require("buffer.ws");
var buffer = new BufferWS()
.writeInt(39)
.writeString("Hello!")
.flip();
console.log(buffer.readInt(), buffer.readString()); // 39 Hello!
npm run test