4 ms·
"Serious problems in versions 1 and 2" suggests that it might be a good idea not to write your own version 1. But to be explicit about the history: version one
by philh 11y ago
"Serious problems in versions 1 and 2" suggests that it might be a good idea not to write your own version 1.
But to be explicit about the history: version one[0] had dependencies. Version two[1] had no dependencies, and a comment on github suggests that it might be wrong but I can't immediately see how. Version three[2] is a different implementation, and adds another export.
[0] https://github.com/tjmehta/is-positive-integer/commit/3003f948b8d95fa234e1d9d41d5423467ec593b0#diff-168726dbe96b3ce427e7fedce31bb0bcR1 https://github.com/tjmehta/is-positive-integer/commit/3003f9...
[1] https://github.com/tjmehta/is-positive-integer/commit/b47e90cdb6111745e1dc10cd31a50d32341c0770 https://github.com/tjmehta/is-positive-integer/commit/b47e90... - it should return false for 0, so I'm not sure what the commenter is getting at
[2] https://github.com/tjmehta/is-positive-integer/commit/3cdfe139e5dee859a958452e3833946dcec2ce41 https://github.com/tjmehta/is-positive-integer/commit/3cdfe1...