I have quite an unusual question.
I don't mean make
script/test.js
, and then in package
"node scripts/test.js"
Instead, I want to somehow run function npm list from my test.js file
As in
let list = npm list
, and i have no idea how to do it, is it even possible? And if so, how? I would also like to save it as string or object. any can work