JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3254
  • Score
    100M100P100Q137988F
  • License MIT

Adds a unique suffix to a string with process and thread uniqueness guarantees. Adapted from https://github.com/npm/write-file-atomic

Package Exports

  • temp-suffix
  • temp-suffix/package.json

Readme

temp-suffix

Adds a unique suffix to a string with process and thread uniqueness guarantees. Adapted from https://github.com/npm/write-file-atomic

var tempSuffix = require(temp-suffix');
var assert = require(assert');

var tempFilename = tempSuffix(__filename);
console.log(tempFilename); // __filename + '-' + [UNIQUE SUFFIX]

var suffix = tempSuffix();
console.log(suffix); // [UNIQUE SUFFIX]