Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sail-sail/long
A Long class for representing a 64 bit two's-complement integer value derived from the Closure Library for stand-alone use and extended with unsigned support.
https://github.com/sail-sail/long
Last synced: 1 day ago
JSON representation
A Long class for representing a 64 bit two's-complement integer value derived from the Closure Library for stand-alone use and extended with unsigned support.
- Host: GitHub
- URL: https://github.com/sail-sail/long
- Owner: sail-sail
- Created: 2022-05-16T07:14:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-16T09:43:56.000Z (over 2 years ago)
- Last Synced: 2024-12-10T21:26:20.493Z (about 2 months ago)
- Language: TypeScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# long
A Long class for representing a 64 bit two's-complement integer value derived from the Closure Library for stand-alone use and extended with unsigned support.
## usage
```ts
import { assert, assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
import Long from "https://deno.land/x/[email protected]/mod.ts";Deno.test("long", function() {
const value = new Long(0xFFFFFFFF, 0x7FFFFFFF);
assertEquals(value.toString(), "9223372036854775807");
});Deno.test("isLong", function() {
const value = new Long(0xFFFFFFFF, 0x7FFFFFFF);
assert(Long.isLong(value));
});
```