---
title: "Spelunking Node's event loop"
publication: "Node Weekly"
issue: 368
published_at: "2020-12-10"
canonical_url: "https://nodeweekly.com/issues/368"
---

Plus new Node and npm releases, and a forgiving Node HTML parser. |        

#368 — December 10, 2020 

[Read on the Web](https://nodeweekly.com/issues/368)   

Node Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/pbuvwhma5anjsbme1vxe.jpg)](https://nodesource.com/blog/event-loop-utilization-nodejs)   

[An Introduction to Event Loop Utilization](https://nodesource.com/blog/event-loop-utilization-nodejs) — Trevor Norris of the core Node.js team has put together a neat writeup of what he’s discovered by measuring and tracking what the event loop is doing. Gets very technical fast, but you might enjoy this brief trip to a fundamental piece of the Node runtime. 

Trevor Norris   

[Node v15.4.0 (Current) Released](https://nodejs.org/en/blog/release/v15.4.0/) — Nothing huge here, but `child_process` now [supports abort signals](https://github.com/nodejs/node/pull/36308), as do [readable streams](https://github.com/nodejs/node/pull/36061), the main ICU (Unicode) dependency has been updated, and there’s a _“very experimental and definitely not finished”_ [BroadcastChannel implementation](https://github.com/nodejs/node/pull/36271) for worker threads (based upon [the Web feature of the same name](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel)). 

Danielle Adams (Node.js Project)   [![\](https://copm.s3.amazonaws.com/cfe64701.png)](https://getstream.io/chat/?utm_campaign=2020_12_10_nodeweekly&utm_medium=promoted_newsletter&utm_source=nodeweekly_promoted) 

[Build Code and Ship In App Messaging in a Few Hours](https://getstream.io/chat/?utm_campaign=2020_12_10_nodeweekly&utm_medium=promoted_newsletter&utm_source=nodeweekly_promoted) — Stream makes it easy with SDKs and Chat React UI Components. Stream powers Feeds and Chat for over one billion end-users. 

Stream sponsor   

[How to Handle Request Validation in Your Express API](https://simonplend.com/how-to-handle-request-validation-in-your-express-api/) — _“You know it’s important, but it’s difficult to pick a validation library, and if you start writing your own custom validation it can quickly start to feel very messy..”_ 

Simon Plenderleith   

[npm v7.1.0 Released with Two Small New Features](https://blog.npmjs.org/post/636604708661886976/release-v710) — Two new small but sweet features. We get a new command – `npm set-script` – which lets you create a task in the `scripts` section of `package.json`. `npm exec` now also triggers an interactive subshell for running installed binaries (in the same way `npm run` scripts can). 

The npm Blog   

📗 **Tutorials and Stories**  

[Serverless Node.js You Can Run Anywhere](https://www.openfaas.com/blog/serverless-nodejs/) — You may have heard of AWS Lambda or Azure Functions, but [OpenFaaS](https://github.com/openfaas/faas) is an interesting open source functions-as-a-service platform you can deploy to your own machines. Here’s how you can use Node with it (and not just functions but Express apps too). 

Alex Ellis   

[Automatically Generating Social Share Images Serverlessly](https://www.ryanfiller.com/blog/automatic-social-share-images/) — This is a perfect use case for a serverless function (on _Netlify Functions_ this time) and a great example of post that pulls together a variety of ideas for a creative end result. 

Ryan Filler   

[Puppeteer vs Selenium vs Playwright, A Browser Automation Speed Comparison](https://blog.checklyhq.com/puppeteer-vs-selenium-vs-playwright-speed-comparison/) — Spoiler: There are differences in microbenchmarks but in real world scenarios it’s basically a wash. Use whichever suits your use case. 

Giovanni Rago (Checkly)   

[10 React Security Best Practices](https://snyk.io/blog/10-react-security-best-practices/?utm_campaign=cooperpress-q4&utm_medium=Email&utm_source=cooperpress-node-weekly&utm_term=react-best-practices&utm_content=react-best-practices) — A checklist to help you and your team find and fix security issues in your React applications. 

Snyk sponsor   

[How to Make Your Code Reviewer 'Fall in Love with You'](https://mtlynch.io/code-review-love/) — Not Node specific and the title is a little.. cute(?) but there's plenty of useful insights and ideas in here that I think you'll enjoy it, particularly if you want ['plays well with others'](https://en.wiktionary.org/wiki/play_well_with_others) on your next report card 😁 

Michael Lynch   

[What's New in Mongoose 5.11: Custom Casting for Paths](http://thecodebarbarian.com/whats-new-in-mongoose-5-11-custom-casting-for-paths.html) 
Valeri Karpov   

[10 `git` Aliases for a Faster Workflow](https://snyk.io/blog/10-git-aliases-for-faster-and-productive-git-workflow/) 
Royee Shemesh (Snyk)   

[How to Use Docker with Node, A Step-by-Step Tutorial](https://geshan.com.np/blog/2020/11/nodejs-with-docker/) 
Geshan Manandhar     

🛠 Code and Tools   

supported by [![Okta\](https://res.cloudinary.com/cpress/image/upload/v1602154330/de7dtktheistsfpqdem4.png)](https://developer.okta.com/?utm_campaign=newsletter_cooperpress_all_multiple_inc_dev_sponsored-section_null&utm_source=cooperpress&utm_medium=cpc)   

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/deljmu2wmtks15fwp6do.jpg)](https://github.com/dominikwilkowski/cfonts)   

[cfonts: Striking Text Banners for the Terminal](https://github.com/dominikwilkowski/cfonts) — If you want to catch everyone’s attention when they install your npm package (please don’t..) this might fit the bill ;-) 

Dominik Wilkowski   

[Nodesource Brings arm64 Support to its Node Binary Distributions](https://nodesource.com/blog/arm64-support-Node.js-binary-distributions) — If you want Node in a package to run on aarch64 with CentOS, RHEL, Fedora, Amazon Linux or CloudLinux, NodeSource has what you need. 

Liz Parody (NodeSource)   

[htmlparser2 6.0.0: A Forgiving HTML and XML Parser](https://github.com/fb55/htmlparser2) — Consumes documents and calls callbacks, but it can generate a DOM as well. There’s [a live demo here](https://astexplorer.net/#/2AmVrGuGVJ). 

Felix Böhm   

[Node.js + Express: An OpenTelemetry Deep Dive](https://lightstep.com/blog/opentelemetry-nodejs-express?utm_campaign=node&utm_source=cooper&utm_medium=Email) 

Lightstep sponsor   

[node-oracledb 5.1: An Oracle Database Driver for Node](https://blogs.oracle.com/opal/faster-json-with-node-oracledb-51-and-oracle-database-21s-new-oson-storage-format) — Coincides with the release of Oracle Database 21c which features enhanced JSON functionality and which this Oracle maintained library now supports too. [GitHub repo](https://github.com/oracle/node-oracledb). 

Oracle   

[pg-listen: Postgres `LISTEN` and `NOTIFY` for Node.js](https://github.com/andywer/pg-listen) — Did you know you can use Postgres as a message broker [with notification channels?](https://tapoueh.org/blog/2018/07/postgresql-listen-notify/) This makes it all easier for Node. 

Andy Wermke   

[Rollpkg: Tool to Create Packages with Rollup and TypeScript](https://github.com/rafgraph/rollpkg) 
Rafael Pedicini  

💻 **Jobs**  

[Principal NodeJS Software Engineer (Remote)](https://t.yesware.com/tt/66550600b75bf3e98c2030c65fd3bb6caf7ab1ac/a1b0f96ca1ce29cb8761f9eb6ffef006/fd6b6a2af75001c75e640e3ea43488e2/www.sstid.com/principal-nodejs-software-engineer/) — We’re looking for a full-time engineer with extensive NodeJS experience. Check out our development team principles and [apply here](https://t.yesware.com/tt/66550600b75bf3e98c2030c65fd3bb6caf7ab1ac/a1b0f96ca1ce29cb8761f9eb6ffef006/fd6b6a2af75001c75e640e3ea43488e2/www.sstid.com/principal-nodejs-software-engineer/). 

STRATEGIC SYSTEMS   

[Find Your Next Job Through Vettery](https://www.vettery.com/tech?utm_source=newsletter&utm_medium=cooper-nodeweekly&utm_term=tech&utm_content=grouped&utm_campaign=ad-88879) — Create a profile on Vettery to connect with hiring managers at startups and Fortune 500 companies. It's free for job-seekers. 

Vettery    

**Got a new email?** You can [change your address here](https://nodeweekly.com/edit_subscription/*|UID|*). 

--- 

**Bored of us?** [Click here to stop getting Node Weekly](https://nodeweekly.com/leave/*|UID|*). 

--- 

**Got a link for us?** Reply and tell us. We can't include everything but we'll look at anything you send. Thanks! 

--- 

**Want to sponsor?** Email `[kristina@cooperpress.com](mailto:kristina@cooperpress.com)` for details. 

--- 

Published by Cooper Press Ltd.
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

[Stop getting this newsletter.](https://nodeweekly.com/leave/*|UID|*)
