ImmutableArrayMap is a data structure that contains:
- Array to save the data
- Map {idAttribute: arrIndex} to maintain pointers to the index in the array
- multiple operations in constant time: update, add, getItem, getIndex, isEmpty, size, getArray
- remove operation in O(n) time
npm install immutable-array-map
import ImmutableArrayMap from 'immutable-array-map';
const data = new ImmutableArrayMap([], 'id', {});
This project is licensed under the MIT License - see the LICENSE.md file for details