1.0.0 • Published 4 years ago
long-ts v1.0.0
long-ts
An alternative to long.js with support for ESM, CJS, UMD and Modern Mode. It's written in TypeScript and thus houses it's own type declarations.
long-ts and long.js differences:
- Removed
Long.isLong()in favor of usinginstanceof. - Removed all aliased shorthand methods like
eqandshrand more. - Using named export
import { Long } from 'long-ts'instead ofconst Long = require('long.js')
Installation
npm install long-tsUsage
import { Long } from "long-ts";
const longVal = new Long(0xffffffff, 0x7fffffff);
console.log(longVal.toString());Documentation
https://hornta.github.io/long-ts/modules.html
Building
npm run build will also build the documentation in /docs
npm install
npm run buildRunning tests:
npm run testRunning linter:
npm run lint1.0.0
4 years ago