sorted-linked-map
v1.1.1
Published
[](https://www.npmjs.com/package/sorted-linked-map) [](https://bundlephobia.com/package/sorted-linked-map)  with items reachable by key.
Usage
import { SortedLinkedMap } from "sorted-linked-map";
type UserType = {
id: string;
name: string;
age: number;
};
const list = new SortedLinkedMap<string, UserType>(
(value) => value.id,
(a, b) => (a.age < b.age ? -1 : 1)
);
list.add({
id: "john.doe",
age: 35,
name: "John Doe",
});
list.add({
id: "john.smith",
age: 28,
name: "John Smith",
});