index.js
function cleanupTempFiles (options) {
  return new Promise((resolve, reject) => {
    if (options.tempDir) {
      if (path.dirname(options.sourceMap) === options.tempDir) {
        fs.unlinkSync(options.sourceMap)
      }
      fs.rmdir(options.tempDir, (err) => {
        if (err) {
          reject(err)
        } else {
          resolve()
        };
      })
    } else {
      resolve()
    }
  })
}
function cleanupTempFiles (options) {
  return new Promise((resolve, reject) => {
    if (options.tempDir) {
      if (path.dirname(options.sourceMap) === options.tempDir) {
        fs.unlinkSync(options.sourceMap)
      }
      fs.rmdir(options.tempDir, (err) => {
        if (err) {
          reject(err)
        } else {
          resolve()
        };
      })
    } else {
      resolve()
    }
  })
}
function cleanupTempFiles ( options ) { return new Promise ( ( resolve , reject ) => { if ( options . tempDir ) { if ( path . dirname ( options . sourceMap ) === options . tempDir ) { fs . unlinkSync ( options . sourceMap ) } fs . rmdir ( options . tempDir , ( err ) => { if ( err ) { reject ( err ) } else { resolve ( ) } ; } ) } else { resolve ( ) } } ) }
Removes temporary files generated by the upload process.

@param {object} options The options
@returns {Promise<object>}
Removes temporary files generated by the upload process .