-
Notifications
You must be signed in to change notification settings - Fork 26
Add option to expire #12
base: master
Are you sure you want to change the base?
Conversation
Thanks @asupian :) I think this is a good contribution I noticed a few things that could use some cleaning up. It looks like you are missing a closing brace for your if. Make sure to run If
Also would you mind adding a few tests that ensure that Thanks again! |
Thanks for the note - apologies for the haste in submitting the pull request! |
@colestrode feel free to review and merge this pull request! |
@@ -34,6 +34,13 @@ module.exports = function(config) { | |||
* @param {String} namespace The namespace to use for storing in Redis | |||
* @returns {{get: get, save: save, all: all, allById: allById}} | |||
*/ | |||
function isInt(n) { | |||
if (isNaN(n) | n === 0) { |
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.
This should be a double pipe operator for logical OR: ||
Sorry for the delay on getting back to you! I thought I had submitted the last comment, but got thwarted by the new Github review UI. I finally submitted that today. If you're still interested in this feature, would you mind adding some tests to cover setting an expiration successfully and handling any errors that may occur (non-number, non-integer, and 0 are cases that come to mind)? Thanks and sorry again for the wait. |
Sure, I'll add that shortly |
No description provided.