Give it a list of files, receive an object keyed by file extension
npm install --save files-by-ext
filesByExt(['test.js', 'test2.js', 'test.css']);
//=> { js: ['test.js', 'test2.js'], css: ['test.css'] }
Returns an object keyed by file extension. Uses
file-extension
behind the scenes.
Type: array
See file-extension
for details on how file extensions are found and how it differs
from path.extname
.
MIT © Kim Joar Bekkelund