SYNOPSIS
INSTALL
npm install sortedmap
USAGE
const SortedMap = const map = 'a' 7 'b' 1 'c' 3 { return a - b} map // 7 map...map // [['b', 1], ['c', 3], ['z', 6], ['a', 7]]
API
constructor
Creates a sorted map with all the method and properties of a regular JS Map
Parameters
values
Array<Array>? the intial values for the Mapcompare
Function A comparator function that takes two arguments and returns a number. The first argument will be a member of sortedArray, the second argument will be item. If item < member, return value < 0 If item > member, return value > 0