Node.js Docs
Node.js documentation parser
Installation
$ npm install node.js-docs
Example
const docs = ; docs ;
API
fetch(version, fetchOptions)
This method fetches & stores data in memory. This method is used by find()
.
This method doesn't parse markdown content. If you want markdown contents, you have to use find()
method.
Params
- version: You can pass
node.js
version here. For example,v12.x
will parse docs for v12. - fetchOptions: You can supply fetch options here. Options type should be
object
. Example:{ force: false, all: false }
. Ifforce
is set totrue
, it will forcefully parse docs again. Ifall
is set totrue
, it will return whole cache instead of the given version.
find(contentQuery, version)
This method parses actual data from the documentation. It returns a string of markdown
which can be converted to html using packages like Showdown.
Params
- contentQuery: You can supply content qyery, generally
node.js
's global/default module name. - version: You can pass
node.js
version here.