Doctrine-File
Doctrine JSDoc Parser
File-Reader for theInstallation
You can install Doctrine-File using npm:
$ npm install doctrine-file --save-dev
Usage
Import doctrine-File inside of your JavaScript:
;
parseFile(file[, options], callback)
file
String PathName to a textfileoptions
Object- All options that doctrine.parse supports, except unwrap which can't be changed.
callback
Function
The callback is passed two arguments (err, comments)
, where comments
is an array of doctrine results.
If no JSDocs can be extracted from the file, the array will be empty.
When the file cannot be read err
will contain the Error
.
Here's a simple example:
;
parseFileContent(content[, options])
content
String | Buffer Content of a complete file to be parsedoptions
Object- All options that doctrine.parse supports, except unwrap which can't be changed.
Here's a simple example:
const content = fs; const comments = ; comments;
License
doctrine-file is licensed under the MIT license.