Comparator

Configurable Comparator similar to java.util.Comparator in Java 8

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/390752/745016/Comparator.js

Author
Gerrit
Version
0.4
Created
2019-10-03
Updated
2019-10-29
License
N/A

Sets up a "compare(a, b)" - function:
- With accessor-functions (e.g. to sort by properies)
- In ascending or descending order
- null and undefined first or last

Possible chaining of Comparators or Accessor-functions.