rimraf node code example
Example 1: rimraf node_modules
// unix
rm -rf node_modules
// windows
npx rimraf ./**/node_modules
Example 2: rimraf node.js
// A viable alternative to `rm -rf`
// GLOBAL INSTALL AND USE FROM CLI
// npm install rimraf --global
> rimraf ./node_modules
// OR LOCAL PROJECT INSTALL
// > npm install rimraf --save
rimraf(`./${userIdFolder}/`,
() => console.log(`DELETED ./${userIdFolder}/`));