files-provider.js
function createFilesProvider({
      regex = null
    , single = HANDLE
    , multi = PROMPT_AND_HANDLE
    , choiceAll = true
    , handler = null
    , promptHeader = defaultPromptHeader
    , promptFooter = defaultPromptFooter
  } = {}) {
  return new FilesProvider({
      regex
    , single
    , multi
    , choiceAll
    , handler
    , promptHeader
    , promptFooter
  })
}
function createFilesProvider({
      regex = null
    , single = HANDLE
    , multi = PROMPT_AND_HANDLE
    , choiceAll = true
    , handler = null
    , promptHeader = defaultPromptHeader
    , promptFooter = defaultPromptFooter
  } = {}) {
  return new FilesProvider({
      regex
    , single
    , multi
    , choiceAll
    , handler
    , promptHeader
    , promptFooter
  })
}
function createFilesProvider ( { regex = null , single = HANDLE , multi = PROMPT_AND_HANDLE , choiceAll = true , handler = null , promptHeader = defaultPromptHeader , promptFooter = defaultPromptFooter } = { } ) { return new FilesProvider ( { regex , single , multi , choiceAll , handler , promptHeader , promptFooter } ) }
Creates a FilesProvider

@param {Object} $0 options
@param {RegExp} $0.regex the regex to match the files with
@param {Number} [$0.single = PROMPT] strategy for handling a single file `HANDLE|RETURN`
@param {Number} [$0.multi = PROMPT_AND_HANDLE] strategy for handling multiple files `HANDLE|PROMPT|RETURN|PROMPT_AND_HANDLE`
@param {Boolean} [$0.choiceAll = true] if `true` a choice to select all files is included when multiple files are found
@param {function} $0.handler function to call when `HANDLE|PROMPT_AND_HANDLE` strategies are selected
@param {String} $0.promptHeader header when prompting user to select a file
@param {String} $0.promptFooter footer when prompting user to select a file

@return {FilesProvider} the files provider
Creates a FilesProvider