1.0.1 • Published 10 months ago

@nfi/tuplemap v1.0.1

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
10 months ago

@nfi/tuplemap

npm version pipeline status coverage status

Map implementation using N-tuples as multi-dimensional keys; matches the interface and behaviour of the ES2015 Map wherever possible.

Installation

npm install @nfi/tuplemap

Documentation

API documentation is available here.

Iteration Order

TupleMaps do not guarantee iteration over keys in insertion order like Maps do; iteration order is consistent for any given set of keys, but not easily predictable.

Deletion Strategy

By default, TupleMaps clean up empty/unneeded internal structures on every key deletion. The delete method has an optional parameter, prune, that can be used to disable this behaviour. This strategy can increase performance for collections with high turnover on a consistent set of keys, but must be supplemented with periodic calls to prune or clear to manually clean up unused structures or they will leak memory over time.

1.0.1

10 months ago

1.0.0

2 years ago