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

Accept all negative values, not just -1 #1

Closed
wants to merge 1 commit into from

Conversation

andris9
Copy link

@andris9 andris9 commented Oct 24, 2011

Hi,

I updated the code to accept any negative value (as it is defined in the Readme), currently only -1 was hardcoded. And in addition to that, I changed the default values to Infinity - it is a number just like any other but always larger than any finite number.

Andris

ps. my code editor trimmed whitespace from the line endings, creating a bit cluttered diff. sorry for that.

@Marak
Copy link
Owner

Marak commented Oct 24, 2011

I'm curious, does this add any additional functionality?

@andris9
Copy link
Author

andris9 commented Oct 24, 2011

No, it does not. It just allows you to pass any negative value as it is said on the documentation, not just -1

note: a negative value will indicate infinite memory/maxUptime

Setting default value to Infinity does not change the behavior in any way, it is a good value to use since it is always greater than any finite number and thus suits well for the task.

@Marak
Copy link
Owner

Marak commented Oct 24, 2011

Cool. I usually don't use the Infinity keyword for anything. I'll run some JSperfs for fun and probably merge it in.

Thanks! :-)

@andris9 andris9 closed this Apr 1, 2019
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.

None yet

2 participants