-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use milliseconds instead of seconds #1
Comments
If you need milliseconds It just be passed |
And maybe in next: stop.sec(3)
// or
stop.ms(300) |
Fair enough |
Still think the right answer is to use milliseconds instead of seconds. This keep the API consistent with standard methods. Not to mention, the bulk of timeouts in JS userland are probably under 1 second, which is the greater use case. |
Yes, good point. it will be changed in next roadmap. What do you think? if this way stop.sec(3)
// or
stop.ms(300) |
Sorry to interrupt, but I guess that only stop(300) using milliseconds it is enough to contemplate the API following the default standards. Adding auxiliary methods just to increase the readability will in fact increase the complexity of the solution, raising the learning curve. It seems overreacting but if you consider the variety of methods in lodash you will realize how big the API would get if they decided to comtemplate things like that. |
hmm, it makes sense |
sindresorhus/delay already supports milliseconds by default, is more flexible and it's smaller (no dependencies) |
API already changes to |
This would be breaking and require a major version bump, but having millisecond-level control is useful for timing and it is the granularity that is supported by all the timing APIs (setTimeout, setInterval, etc..).
The text was updated successfully, but these errors were encountered: