question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

0 is not a positive number

See original GitHub issue

.positive() accepts 0, but shouldn’t 0 not be considered a positive number?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

31reactions
maxaggedoncommented, Apr 4, 2019

@iPwnPancakes isn’t number().min(0) what you need ?

12reactions
glennwidenercommented, Oct 2, 2018

So, zero is not positive, so, yes, this is a bug. The workaround (ugh!) yup.number().moreThan(0)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is zero positive or negative? - Mathematics Stack Exchange
Actually, zero is neither a negative or a positive number. The whole idea of positive and negative is defined in terms of zero....
Read more >
Is 0 a positive number or a negative number? - Quora
Zero is neither a positive number nor a negative number. It is the number defined by nothing. But is a number. Boiled down...
Read more >
Is zero a positive or negative number (in English) - YouTube
Topic: Is Zero is a positive or negative numberIn this tutorial you will understand whether zero is a positive or negative number.
Read more >
Is Zero Positive or Negative? - MathFour
We think of the numbers as either positive or negative. ... But actually, all real numbers can be divided into three categories: positive,...
Read more >
Is 0 considered a positive integer : Quantitative - GMAT Club
An even number is one that divides evenly by 2, with no remainder. So yes, 0 is considered an even number. But it's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found