funkia / list

🐆 An immutable list with unmatched performance and a comprehensive functional API.
MIT License
1.65k stars 53 forks source link

nth() throws when it's passed NaN #87

Open pvarga-dni opened 4 years ago

pvarga-dni commented 4 years ago

See https://runkit.com/embed/pla9168o8dha

paldepind commented 4 years ago

Thank you for reporting this @pvarga-dni.

What do you think should happen when nth is passed NaN?

pvarga-dni commented 1 year ago

@paldepind I think the same as when passing a negative index, an index that's too large, a float, Inifinity, etc.. nth() just returns undefined.