I want to use node.js to automatically add comments for the designated location, there is no train of thought, ask for advice!

clipboard.png

for example, adding comments on data structures for activities, the crux of the problem is that you don"t know how to write a file at a certain point in the file

Mar.24,2021

be simple and rude and use raplece directly.

arr[i] = arr[i].replace(/activities/g, `// 
activities`);

I don't know what kind of demand it comes from?

simply read the file to the specified column on the specified line and add a comment.
however, there is a problem to consider. If you add a new comment, the following code will all be moved down one line.

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-1b3943e-34548.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-1b3943e-34548.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?