I want to change a specific line in a text file using node js with the fs module.
Is there a more elegant way then loading the file into an array?
Old File:
Line 1
Line 2
Line 3
New File:
Line 1
something new
Line 3
Thanks for your replies!
Try using this:
If this doesn't work, visit https://www.npmjs.com/package/replace-in-file.