The tmp package with promises support and disposers.
93
Build a utility that creates temporary files for processing user-uploaded data with automatic cleanup.
Create a module that provides functionality to process user data by:
The module should export a function processUserData that:
.txt extension@generates
/**
* Processes user data by writing it to a temporary file,
* reading it back, converting to uppercase, and cleaning up.
*
* @param {string} data - The user data to process
* @returns {Promise<string>} The processed data in uppercase
* @throws {Error} If data processing fails
*/
async function processUserData(data) {
// IMPLEMENTATION HERE
}
module.exports = {
processUserData
};Provides temporary file creation and management with Promise support.
@satisfied-by
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