-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
#2285-Add-example-scripts-hyperloglog - Added hyperloglog examples to… #2289
#2285-Add-example-scripts-hyperloglog - Added hyperloglog examples to… #2289
Conversation
…es to address Issue redis#2285
Closes #2285 when merged. |
examples/hyperloglog.js
Outdated
@@ -0,0 +1,51 @@ | |||
//Example to log traffic data at intersections for the city of San Francisco. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put a space after //
in comments throughout, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you - looking good, the code works well thanks. I've left a couple of suggestions, please ensure all comments have a space between the //
and the text, and that sentences end with a full stop / period... so:
// this is a comment.
rather than:
//this is a comment
Thank you!
examples/hyperloglog.js
Outdated
@@ -0,0 +1,51 @@ | |||
//Example to log traffic data at intersections for the city of San Francisco. | |||
//Log license plates of each car scanned at each intersection and add to the intersections Hyperloglog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//Log license plates of each car scanned at each intersection and add to the intersections Hyperloglog | |
// Log license plates of each car scanned at each intersection and add to the intersections Hyperloglog. |
examples/hyperloglog.js
Outdated
|
||
await client.connect(); | ||
|
||
//To Create a HyperLogLog, the `pfAdd` method is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//To Create a HyperLogLog, the `pfAdd` method is used. | |
// Use `pfAdd` to add an element to a Hyperloglog, creating the Hyperloglog if necessary. |
@simonprickett Thanks for the feedback, Changes made |
Thanks @ade1705, we'll review this! In the meantime, if you're a member of our Discord server (https://discord.gg/redis), please let us know your handle. Thanks! |
Yea, I am a member of the discord, my handle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me and works when tested. Thank you!
Added example scripts for the hyperloglog as requested - #2285
created a hyperloglog.js file
Checklist
npm test
pass with this change (including linting)?