montagejs / collections

This package contains JavaScript implementations of common data structures with idiomatic interfaces.
http://www.collectionsjs.com
Other
2.09k stars 185 forks source link

Improve documentation for equals and compare #186

Open croraf opened 6 years ago

croraf commented 6 years ago

I'm checking a number of classes and cannot find their usage examples.

For example what I need is http://www.collectionsjs.com/sorted-map. I need to make custom compare and equals.

I assume I should pass equals and compare functions in the factory function SortedMap(entries, equals, compare).

What is the format of these functions, any examples of how should I use them?