promise-throttle icon indicating copy to clipboard operation
promise-throttle copied to clipboard

Documentation is missing a bunch of functionality?

Open Jakobud opened this issue 5 years ago • 2 comments

Perhaps I'm missing something, but it seems like your examples use a lot of functionality that is missing from your documentation. For example I don't see anything in the docs about createPromiseThrottle, promiseImplementation option, etc. Also your documentation describes requestsPerSecond as a function argument, not an option but your examples show the opposite.

Just confused here maybe...

Jakobud avatar Aug 16 '19 21:08 Jakobud

Hi @Jakobud!

The auto generated documentation is missing some information that does exist in the README. Thus, it is better to check the README file for the time being.

For createPromiseThrottle, check https://github.com/JMPerez/promise-throttle#options For promiseImplementation you can check https://github.com/JMPerez/promise-throttle#use

The documentation generated for requestsPerSecond is wrong. It's based on https://github.com/JMPerez/promise-throttle/blob/master/lib/main.js#L7 and it doesn't understand that requestsPerSecond is a property passed in the options object argument.

JMPerez avatar Sep 02 '19 05:09 JMPerez

The documentation generated for requestsPerSecond is wrong. It's based on https://github.com/JMPerez/promise-throttle/blob/master/lib/main.js#L7 and it doesn't understand that requestsPerSecond is a property passed in the options object argument.

Hi... Very useful looking library... Just a tip here re: the JSDoc...

The proper JSDoc per the second example at https://jsdoc.app/tags-param.html#parameters-with-properties is that you should add options. to the property:

/**
 * @constructor
 * @param {Object} options A set op options to pass to the throttle function
 * @param {number} options.requestsPerSecond The amount of requests per
 *                                                                                 second the library will limit to
 */

This might cause your documentation generator to give the intended result.

brettz9 avatar Mar 31 '22 21:03 brettz9