• kevincox
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    1 year ago

    No. It always compares by converting to string. I actually think this is more consistent then having different behaviour if you have a string somewhere in your list.

    Basically the default comparator is a.sort((a, b) => `${a}` < `${b}` ? -1 : 1).