array of strings to be sorted
dictionary of {string:rating} ratings does not have to contain an entry for each arr item if missing, will be given default 0 likewise, it may contain more entries than arr, extras will be ignored
make position x times more important than rating (default 1) It's kind of backwards - Make it less than 1 to make rating more important. 0.5 is a good start. Just need to try it until you get a good value. In a very long list, ok to make it 0.1 or even 0.01.
By default, this function will modify the arr, using arr.sort(). Set true
to make
this a pure function.
Generated using TypeDoc
Sort array of strings by separate dictionary of ratings and also by position in array. Items at front of array will be rated higher.