Skip to content

Latest commit

 

History

History
64 lines (39 loc) · 1.15 KB

README.md

File metadata and controls

64 lines (39 loc) · 1.15 KB

buffer.ws

A simple, light and fast bytebuffer implementation under node.js

Hits Inline docs

Table of Contents

Installation

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';

Usage

Example:

var BufferWS = require("buffer.ws");

var buffer = new BufferWS()
                .writeInt(39)
                .writeString("Hello!")
                .flip();
console.log(buffer.readInt(), buffer.readString()); // 39 Hello!

Wiki

Testing

npm run test