# int64

[![npm version](https://badge.fury.io/js/%40chengaoyuan%2Fint64.svg)](https://badge.fury.io/js/%40chengaoyuan%2Fint64)
[![install size](https://packagephobia.now.sh/badge?p=@chengaoyuan/int64)](https://packagephobia.now.sh/result?p=@chengaoyuan/int64)
[![NPM Downloads](https://img.shields.io/npm/dm/@chengaoyuan/int64.svg?style=flat)](https://npmcharts.com/compare/@chengaoyuan/int64?minimal=true)
[![Build Status](https://travis-ci.org/GithubCGY/int64.svg?branch=master)](https://travis-ci.org/GithubCGY/int64)
[![Coverage Status](https://coveralls.io/repos/github/GithubCGY/int64/badge.svg?branch=master)](https://coveralls.io/github/GithubCGY/int64?branch=master)

## Installation

    $ npm install @chengaoyuan/int64

## Usage

```ts
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
