The tmp package with promises support and disposers.
93
A service that generates unique temporary filenames for various application modules, each with specific naming requirements.
@generates
/**
* Generates a unique temporary filename with the specified options.
*
* @param {Object} options - Configuration for filename generation
* @param {string} [options.prefix] - Prefix for the filename
* @param {string} [options.postfix] - Suffix/extension for the filename
* @param {string} [options.template] - Template pattern with XXXXXX placeholder
* @returns {string} A unique temporary filename path
*/
function generateTempFilename(options) {
// IMPLEMENTATION HERE
}
/**
* Generates multiple unique temporary filenames for different application modules.
*
* @param {Object} moduleConfigs - Map of module names to their filename configurations
* @returns {Object} Map of module names to their generated filenames
*/
function generateModuleFilenames(moduleConfigs) {
// IMPLEMENTATION HERE
}
module.exports = {
generateTempFilename,
generateModuleFilenames
};Provides temporary file and directory creation with promise support.
Install with Tessl CLI
npx tessl i tessl/npm-tmp-promisedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10