1.0.6 • Published 6 months ago

apt-map v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

apt-map

Convenient iterable map based on ES6 Map. Classic map has only forEach() method, which is not quite enough in many cases. AptMap implements the most commonly used methods from array like filter, find, some etc.

AptMap<K, V>;

K - generic type for key, can be any type including object

V - generic type for value, can be any type including object

Example:

const obj = {
  a: 1,
  b: 2,
};
const entries: [string, number][] = Object.entries(obj);
const map = new AptMap<string, number>();

Installation

npm install --save apt-map

Features

  • Combines pros of array and ES6 Map (classic js object). You can work with the collection similar way as with an array and also able to get element by key with O(1) complexity.
  • Extends basic ES6 Map so backward compatible and traditional Map can be substituted with AptMap when needed.

Please check the generated documentation.

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago