I’m doing some code in nodejs and I found the need to create directories recursively. Basically I need to have the same functionality offered by mkdir -p.
The fs lib doesn’t offer this functionality so I looked around but couldn’t really find anything that suited me. I finally gave up and I’m writing the function myself.
Here’s the code: