files-by-ext

1.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    3

Package Sidebar

Install

npm i files-by-ext

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kimjoar