the-binary
Binary data generator
Installation
$ npm install the-binary --save
Usage
'use strict'
const { TheBinary } = require('the-binary')
async function tryExample () {
const binary = new TheBinary(6)
binary.pushUInt16(12)
binary.pushString('hoge')
equal(binary.getUInt16(0), 12)
equal(binary.getString(2, 4), 'hoge')
}
tryExample().catch((err) => console.error(err))
API Guide
License
This software is released under the MIT License.