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

Add throttling (rate-limiting) of requests. #5

Merged
merged 7 commits into from
Nov 18, 2015
Merged

Add throttling (rate-limiting) of requests. #5

merged 7 commits into from
Nov 18, 2015

Conversation

stephenfarrar
Copy link
Contributor

No description provided.

* Returns the tail of the list, or undefined if the list has not yet
* reached capacity.
*/
tail: function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename this to mostRecent() or something similar? I read tail() as "all items but the first (or head)".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I guess it should be earliest() or something right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I've changed the method names. To get the last item is now done like this:

list.item(size - 1)

I think that's much more obvious.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

push() becomes insert().
tail() becomes item() and can access any item in the buffer.
stephenmcd added a commit that referenced this pull request Nov 18, 2015
Add throttling (rate-limiting) of requests.
@stephenmcd stephenmcd merged commit f4e82c1 into master Nov 18, 2015
@stephenfarrar stephenfarrar deleted the throttle branch November 18, 2015 04:10
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

Successfully merging this pull request may close these issues.

2 participants