Names for require(‘child_process’)
It’s not obvious, right? Because here’s this module with a wacky snake_case name in your codebase which is surrounded by otherwise camelCase things. Here’s what people assign it to.
From a search for \w+\s*=\s*require\(['"]child_process['"]\)(;|$) count:2000
on Sourcegraph, weighted by repository stars.
For example, if a repository had 12 stars and had three matches in the search results, twice with child_process = ...
and once with cp = ...
, it would contribute 8 votes for child_process
and 4 votes for cp
.
I realized afterwards that people could be doing require('node:child_process')
now, but I had to load the search results manually, and I don’t want to do that again.
Here’s some other data that I also collected from the same search results.
Presence of var
or const
or let
on the line where the match occurs.
That little green slice at the top is let
.
Presence of ;
at the end of the match. I double checked, and the query can match no-semicolon lines, and such results exist, only they didn’t include any.
My last post was about either A salsa made of tempura instead of raw vegetables or AsyncGeneratorFunction objects in JavaScript. Find out which.