cheminfo-js / spectra-data

Library to deal with spectra (IR, UV, ...), 1D NMR as well as 2D NMR
https://cheminfo-js.github.io/spectra-data
MIT License
4 stars 0 forks source link

Cleanup documentation #52

Open stropitek opened 7 years ago

stropitek commented 7 years ago

The documentation is very messy right now. Most of the stuff should not be publicly documented, only the public API should. The possibilities:

Also you should review the warnings given by eslint about jsdoc: npm run eslint and try to fix them.

stropitek commented 7 years ago

Reminder: to build the documentation, cheminfo docs, to build and push the documentation to github: cheminfo docs --publish

stropitek commented 7 years ago

Here is an example of how to properly document a function that has an object passed as argument and default options

    /**
     * Creates a SD instance from the given jcamp.
     * @param {string} jcamp - The jcamp string to parse from
     * @param {object} options - Jcamp parsing options
     * @param {boolean} [options.keepSpectra=true] - If set to false the spectra data points will not be stored in the instance
     * @param {RegExp} [options.keepRecordsRegExp=/^.+$/] - A regular expression for metadata fields to extract from the jcamp
     * @return {SD} Return the constructed SD instance
     */
andcastillo commented 7 years ago

Some functions in the API have an old format. And it has not been updated. About the verbosity of the private functions, it is automatically generated when your write /** and Enter to write the function signature and I don't find anything bad in it. But the idea of marking it as private seems good to me.

andcastillo commented 7 years ago

@jobo322 you should take care of this thread.