On this page

    replaceDuplicates(array, fn, comparator?): T[]
    Attributes
    array:T[]
    fn:(duplicateItem: T, duplicateItemIndex: number, numberOfTimesReplaced: number) => T
    comparator:(firstElement: T, nextElement: T) => 0 | 1 | -1
    Returns:T[]