https://github.com/samchon/big-associative
Big associative containers who can store over 14M elements.
https://github.com/samchon/big-associative
Last synced: about 1 year ago
JSON representation
Big associative containers who can store over 14M elements.
- Host: GitHub
- URL: https://github.com/samchon/big-associative
- Owner: samchon
- License: mit
- Created: 2020-10-23T01:19:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-23T06:09:03.000Z (over 5 years ago)
- Last Synced: 2025-04-20T03:32:20.240Z (about 1 year ago)
- Language: TypeScript
- Size: 10.7 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Big Associative
## Outline
Native associative containers of the JavaScript, they only can store under 224 elements.
The `big-associative` provides extended associative containers who can ignore the limitations. With the below components, you can store infinite elements until the memory overflow.
JS Native | Extended
----------|----------
Map | BigMap
Set | BigSet
WeakMap | BigWeakMap
WeakSet | BigWeakSet
## Installation
### NPM Module
Installing the `big-associative` is very easy. Just use the *npm install* command.
```bash
npm install --save big-associative
```
### Usage
Just import `big-associative` and use any class what you want:
```typescript
import { BigMap, BigSet, BigWeakMap, BigWeakSet } from "big-associative";
function main(): void
{
const map: BigMap = new BigMap();
for (let i: number = 0; i < Number.MAX_INTEGER; ++i)
map.set(i, i);
}
```