JavaScript file manipulation in OIC
Summary
Need to add carriage return/line at the end of the Jason file created through Stage activityContent
Hi,
I need to add a carriage return/line at the end of the file and the file was created under staging location (using stage activity). I try to use below java script function by passing the filename to manipulate but getting error at line ( const fs = require('fs'); ).
Do I need to import any java script file libraries?. Please let me know.
function addEOL(filename) {
const fs = require('fs');
fs.appendFile(filename, 'data to append', function (err) {
if (err) throw err;
0