I\'d like to find all *.html files in src folder and all its sub folders using nodejs. What is the best way to do it?
var folder = \'/project1/src\'; var ex
Old post but ES6 now handles this out of the box with the includes method.
includes
let files = ['file.json', 'other.js']; let jsonFiles = files.filter(file => file.includes('.json')); console.log("Files: ", jsonFiles) ==> //file.json