The .sort is extremely fast, and it cannot hurt to make things
deterministic, to avoid flickering tests for instance.
This is borderline bikesheddy, but I noticed the readdir call without sort when I read the source. I like to protect all my readdir calls (as well as Object.keys and friends) with .sort to keep my libraries deterministic.
The .sort is extremely fast, and it cannot hurt to make things deterministic, to avoid flickering tests for instance.
This is borderline bikesheddy, but I noticed the
readdir
call withoutsort
when I read the source. I like to protect all myreaddir
calls (as well asObject.keys
and friends) with.sort
to keep my libraries deterministic.Please merge if you like, or close otherwise. :)