Skip to content

sayag11/ImmutableArrayMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

ImmutableArrayMap

ImmutableArrayMap is a data structure that contains:

  1. Array to save the data
  2. Map {idAttribute: arrIndex} to maintain pointers to the index in the array

Features

  • multiple operations in constant time: update, add, getItem, getIndex, isEmpty, size, getArray
  • remove operation in O(n) time

Installing

npm install immutable-array-map

Usage

import ImmutableArrayMap from 'immutable-array-map';

const data = new ImmutableArrayMap([], 'id', {});

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published