fabi.s

Generation

generate functionSat, 05 Nov 2022

nodejs async main function

function async_main() { var args = process.argv.slice(2); let [file_name, ...file_paths] = args; fs.readFile(file_name, (err, data) => { if (err) throw err; let new_data = data.toString(); for (let fp of file_paths) { console.log(new_data.replace("world", fp)); } }) }

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant