Optionaloptions: TempOptionsOptions for creating the temporary path.
A promise that resolves to an AsyncIOResult containing the created path.
// Create a temporary file
(await mkTemp())
.inspect(path => console.log(path)); // '/tmp/tmp-550e8400-e29b-41d4-a716-446655440000'
// Create a temporary directory
await mkTemp({ isDirectory: true });
// Create with custom basename and extension
await mkTemp({ basename: 'cache', extname: '.json' });
Creates a temporary file or directory in the
/tmpdirectory. Usescrypto.randomUUID()to generate a unique name.