long.js
long.js copied to clipboard
A Long class for representing a 64-bit two's-complement integer value.
Fantastic library! I've ported it to Lua. https://github.com/BixData/lua-long Anyone know how to implement a power function? It'd make a great addition.
Its nice to have with `fromBytes` and `toBytes` utils to interact with a data-stream https://github.com/dcodeIO/long.js/blob/9448e61647f884144da26e5c13b503d586ad644b/src/long.js#L1329 However it would be useful if someone using this API wouldn't need to splice the...
You can add something like "By default signed value is assumed" to be clear
Some methods like `fromString` and `toString` throw exceptions. It would be useful to document them in the README that gets placed on npmjs. Thanks!
Big unsigned Longs are not correctly checked for equality with a string. ## Steps to reproduce: see [this JSFiddle](https://jsfiddle.net/cog1u4m7/) ## Expected behaviour: .equals() returns true for given arguments ## Actual...
Typescript 4.7^ with mode resolution strategy set to nodenext, is confused about finding export = in d.ts file and complains about default import not being allowed (when imported as import...
Please add the correct copyright holders to your licence file, right now it's just the template.
See https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing
The previous PR to resolve this issue (#124) ended up duplicating the types to the umd module. Moving the source-of-truth to the `./umd/index.d.ts` file enables the `./index.d.ts` file to import...
``` import Long from "../index.js"; export = Long; ``` previous code generates errors complaining about cannot import from ESmodule to commonJS. a workaround is to duplicate the content of index.d.ts...