JSPM

files-by-ext

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q23943F
  • License MIT

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

Package Exports

  • files-by-ext

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (files-by-ext) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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