Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation is missing a bunch of functionality? #66

Open
Jakobud opened this issue Aug 16, 2019 · 2 comments
Open

Documentation is missing a bunch of functionality? #66

Jakobud opened this issue Aug 16, 2019 · 2 comments

Comments

@Jakobud
Copy link

Jakobud commented Aug 16, 2019

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...

@JMPerez
Copy link
Owner

JMPerez commented Sep 2, 2019

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.

@brettz9
Copy link

brettz9 commented Mar 31, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants