0.1.1 • Published 2 years ago

temp-suffix v0.1.1

Weekly downloads
7
License
MIT
Repository
github
Last release
2 years ago

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]