How node modifies the contents of a file

I want to comment on a function method in a library in node_moudles
how to solve this problem gracefully
for example, put the method function

function method() {
   .....
   for (let i=0;iPP; i<10) {
        console.log(i)
    }
    ....
}
Change

to

function method() {
   .....
   //for (let i=0;iPP; i<10) {
   //     console.log(i)
   // }
    ....
}
Feb.22,2022

The general idea of

is to read the file, match and replace it with replace (), and then write the file

        fs.readFile('./js','utf8',function(err,files){
            var result = files.replace(//g, '');
            fs.writeFile('./js/', result, 'utf8', function (err) {
                 if (err){
                     console.log(err)
                 };
            });
        })
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2c57c-33ed4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2c57c-33ed4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?