README
int64
Installation
$ npm install @chengaoyuan/int64
Usage
import { setInt64, setUint64, getInt64, getUint64 } from "@chengaoyuan/int64";
const ab = new ArrayBuffer(8);
const dv = new DataView(ab);
setInt64(dv, 0, 1234567890, false);
console.log(getInt64(dv, 0, false)); // out: 1234567890
setInt64(dv, 0, -1234567890, true);
console.log(getInt64(dv, 0, true)); // out: -1234567890
setUint64(dv, 0, 1234567890, false);
console.log(getUint64(dv, 0, false)); // out: 1234567890
Testing
$ npm test