Closed ktalebian closed 4 years ago
There is an option called postfix
. E.g., this will create a file named prefix-???-postfix.txt
where ???
is some random string inserted by the library:
const txtFileObj = tmp.fileSync({
prefix: `prefix-`,
postfix: '-postfix.txt',
});
Thanks to @bartvanandel for answering the question.
See also the options https://github.com/raszi/node-tmp#options
How can I create a tmp file with an extension?