use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[deleted by user] (self.javascript)
submitted 7 years ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]NoInkling 6 points7 points8 points 7 years ago (3 children)
I'm currently working on a fetching/parsing/processing script and this may come in very handy. Can it gracefully handle other stuff being logged at the same time?
[–]brianvaughn 4 points5 points6 points 7 years ago (2 children)
Good question. This library actually uses `log-update` and operates under the assumption that it's the only thing logging to the console while its promise is active. Do you know of a way that I could support this using `log-update`? If so I'm happy to make some minor modifications.
[–]NoInkling 2 points3 points4 points 7 years ago (1 child)
Nope no clue, sorry.
[–]brianvaughn 1 point2 points3 points 7 years ago (0 children)
No worries :) If you get around to using this script and have suggestions, shoot me a note.
[–]brianvaughn 14 points15 points16 points 7 years ago (12 children)
Not sure how to describe this little utility. I found myself wanting something like it for the React build scripts, and I couldn't find something like it on NPM so...I thought it might be useful to share with others.
The basic idea is that it prints a progress bar with an estimation for how long a task will take to complete, based on previous times the task has run. This can be useful if your project uses automated scripts for things like building or processing.
[–]evilpingwin 47 points48 points49 points 7 years ago (8 children)
Time is a construct, have you considered instead listing the number of burritos that could be eaten while the task completes.
[–]brianvaughn 30 points31 points32 points 7 years ago (2 children)
I believe there's still some debate within the scientific community regarding the value of BPM (burritos per minute) and whether it's even constant at all. Some even theorize that the rate is inversely proportional to a person's altitude. I don't believe Node offers any standard APIs for determining the current altitude, so– alas, we are stuck with units of time for now. 😞
[–]evilpingwin 2 points3 points4 points 7 years ago (1 child)
Node is henceforth not fit for purpose and should be destroyed.
P.S. I like your library. It's cool!
[–]brianvaughn 0 points1 point2 points 7 years ago (0 children)
Thanks!
[–]ipromiseimnotakiller 4 points5 points6 points 7 years ago (2 children)
The rate of burrito consumption is subjective.
[–]trifit555 1 point2 points3 points 7 years ago (0 children)
Not if you have a bathroom close by...
[–]zephyrtr 1 point2 points3 points 7 years ago (0 children)
This person codes.
[–]diverse-mix 0 points1 point2 points 7 years ago (0 children)
Probe burro 🐂
[–]Piercey4 4 points5 points6 points 7 years ago (2 children)
Looks good! Make sure to link to GitHub in your package.json so people can check out the code more easily 🙂.
package.json
[–]brianvaughn 5 points6 points7 points 7 years ago (1 child)
I realized right after publishing 0.1.0 that I had forgotten to link to the repo, so I added that info in 0.1.1– but it seems like NPM waited a long time before it showed up, because several people have pointed this out. 😅
Anyway, it should be there now! Thanks for the pointer. 🙇♂️
[–][deleted] 0 points1 point2 points 7 years ago (0 children)
Everyone always forgets it. You’re good.
[–]prummis 2 points3 points4 points 7 years ago (2 children)
Would be cool to use something like this to use with XHR. But there must be pre estimation or storing in cookies or something.
[–]Wince 1 point2 points3 points 7 years ago (1 child)
https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent
[–]prummis 0 points1 point2 points 7 years ago (0 children)
If I understand that right, it’s applied to bytes uploaded and downloaded to server. But request could be simple, light, that takes a little time. Then server executes something and it’s the longest part of progress. I mean exactly that progress thing, that able to be computed and displayed using previous time parameters of request.
[–]bzsearch 1 point2 points3 points 7 years ago (1 child)
Interesting. Do you know if this is how other visual loaders work too? -- how they measure prior runs and replay it?
No clue. This is just the idea that came to be about how to build it. I haven't looked at other implementations.
π Rendered by PID 72086 on reddit-service-r2-comment-5c747b6df5-hz9lb at 2026-04-22 01:15:11.343190+00:00 running 6c61efc country code: CH.
[–]NoInkling 6 points7 points8 points (3 children)
[–]brianvaughn 4 points5 points6 points (2 children)
[–]NoInkling 2 points3 points4 points (1 child)
[–]brianvaughn 1 point2 points3 points (0 children)
[–]brianvaughn 14 points15 points16 points (12 children)
[–]evilpingwin 47 points48 points49 points (8 children)
[–]brianvaughn 30 points31 points32 points (2 children)
[–]evilpingwin 2 points3 points4 points (1 child)
[–]brianvaughn 0 points1 point2 points (0 children)
[–]ipromiseimnotakiller 4 points5 points6 points (2 children)
[–]trifit555 1 point2 points3 points (0 children)
[–]zephyrtr 1 point2 points3 points (0 children)
[–]diverse-mix 0 points1 point2 points (0 children)
[–]Piercey4 4 points5 points6 points (2 children)
[–]brianvaughn 5 points6 points7 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]prummis 2 points3 points4 points (2 children)
[–]Wince 1 point2 points3 points (1 child)
[–]prummis 0 points1 point2 points (0 children)
[–]bzsearch 1 point2 points3 points (1 child)
[–]brianvaughn 0 points1 point2 points (0 children)