Download the following repositories and run yarn install in each:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* 5. Filter directory for a extension name */ | |
| const fs = require('fs') | |
| const path = require('path') | |
| const directory = process.argv[2] | |
| const extension = `.${process.argv[3]}` | |
| fs.readdir(directory, (err,list) => { | |
| list.forEach(file => { | |
| if(path.extname(file) === file) { | |
| console.log(file) |