Skip to content

kimjoar/files-by-ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

files-by-ext

Give it a list of files, receive an object keyed by file extension

Install

npm install --save files-by-ext

Usage

filesByExt(['test.js', 'test2.js', 'test.css']);
//=> { js: ['test.js', 'test2.js'], css: ['test.css'] }

API

filesByExt(files)

Returns an object keyed by file extension. Uses file-extension behind the scenes.

files

Type: array

See file-extension for details on how file extensions are found and how it differs from path.extname.

License

MIT © Kim Joar Bekkelund

About

Give it a list of files, receive an object with the files keyed by file extension

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published