Skip to content

parser-factory

parserFactory : object

Factory object for creating parser instances based on file types.

Kind: global namespace

parserFactory.createParser(fileType) ⇒ Parser

Creates and returns a parser instance based on the provided file type.

Kind: static method of parserFactory
Returns: Parser - - An instance of a parser corresponding to the file type.
Throws:

  • Error - Throws an error if the provided file type is unsupported.
ParamTypeDescription
fileTypestringThe type of the file (e.g., '.js', '.js', '.vue').

Released under the MIT License.