1.1.3 • Published 7 years ago

bufferjs-web v1.1.3

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

Buffer.js

Translate ArrayBuffers to strings and vice versa in JavaScript. This library is mainly useful for sending WebSocket messages as Binary packets.

Browser

Insert the script tag into your markup:

<script src="https://cdn.jsdelivr.net/npm/bufferjs-web/dist/buffer.min.js"></script>

Usage in the browser:

Buff = window.Buff;

var buffer = Buff.Writer('a test string'); // Translates the string "test" info an ArrayBuffer.
var string = Buff.Reader(buffer); // Translates the ArrayBuffer back into the string "test".

Node.JS

Install with the command:

npm i bufferjs-web

Usage in Node.js:

const Buff = require('bufferjs-web');

var buffer = Buff.Writer('a test string'); // Translates the string "test" info an ArrayBuffer.
var string = Buff.Reader(buffer); // Translates the ArrayBuffer back into the string "test".
1.1.3

7 years ago

1.1.2

7 years ago

1.0.5

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago