Get line of file content that contain a string

I wanted to get line content in a file that contains a string in discord js node.

Something like this:

If (file contains("string")){
console.log(line content)
}

like, if one of the lines in the file contains the string. It’s gonna send the line that contains the string to the console.