by simplyinfinity · 7y ago · 0 comments
console:
The output console.timeEnd()
and console.timeLog()
will now automatically select a suitable time unit instead of always using milliseconds (Xavier Stouder) #29251
Am I the only one that finds this unacceptable? Instead of a consistent result of a number, let's return string.. That now I have to parse..It's not an API incompatibility.
This is definitely one of the gray areas when deciding whether or not to consider it a breaking change.
The default is really important for something like this. Much more important than consistency.
Classic HN comment on this topic: https://news.ycombinator.com/item?id=6530180
A well defined function should have a single purpose, and a reliable and repeatable output.