index.js 234 B

12345678910111213
  1. 'use strict';
  2. const fs = require('fs');
  3. const os = require('os');
  4. const ID = '__RESOLVED_TMP_DIR__';
  5. if (!global[ID]) {
  6. Object.defineProperty(global, ID, {
  7. value: fs.realpathSync(os.tmpdir())
  8. });
  9. }
  10. module.exports = global[ID];