Just wanted to point out that mkdirp can be accomplish with just the flag recursive: true nowadays
fs.promises.mkdir(dirPath, { recursive: true });
rimraf
same as above with
fs.promises.rmdir(dirPath, { recursive: true });
Setting recursive to true results in behavior similar to the Unix command rm -rf: an error will not be raised for paths that do not exist, and paths that represent files will be deleted. The permissive behavior of the recursive option is deprecated, ENOTDIR and ENOENT will be thrown in the future.
Altho behaviour could change in the future resulting in having to use more than just one line to achieve desired effect
Just wanted to point out that mkdirp can be accomplish with just the flag recursive: true nowadays
same as above with
Setting recursive to true results in behavior similar to the Unix command rm -rf: an error will not be raised for paths that do not exist, and paths that represent files will be deleted. The permissive behavior of the recursive option is deprecated, ENOTDIR and ENOENT will be thrown in the future.
Altho behaviour could change in the future resulting in having to use more than just one line to achieve desired effect
Moment.js is deprecated (recently) : https://momentjs.com/docs/#/-project-status/