This is a widely used library to create temporary files and directories in a node.js environment. Tmp offers both an asynchronous and a synchronous API. For all API calls, all the parameters are optional. There also exists a promisified version of the API, see tmp-promise. Tmp uses crypto for determining random file names, or, when using templates, a six letter random identifier. And just in case