Sort array of strings by separate dictionary of [{string:rating},]
However, will be sorted not in relation to other ratings, but in relation to zero 0.
If higher than 0, will be promoted. Lower than 0 will be demoted to back of list.
(Todo: File/Function should be renamed, to reflect this relation to zero!)
Returns
array of strings
Parameters
arr: string[]
{Array} - array of strings
ratings: Record<string, number>
{object} - dictionary of {string:rating}
rating lt 0 == bad, gt 0 == good, if undefined, default 0
Sort array of strings by separate dictionary of [{string:rating},] However, will be sorted not in relation to other ratings, but in relation to zero 0. If higher than 0, will be promoted. Lower than 0 will be demoted to back of list. (Todo: File/Function should be renamed, to reflect this relation to zero!)
Returns