v2.1.0
- Added support for unbounded (i.e., infinite) ranges.
- Added support for ranges containing zero and negative integers.
- Added
isUnbounded()
method.
Background Compatibility: Most existing code should work just fine, but strings which used to be errors are now considered valid. For example, new MultiRange('2-')
and new MultiRange('(-10)')
raised a SyntaxError
until v2.0.0, but now these are valid ways to denote unbound and negative ranges, respectively. Those who passes arbitrary user input to the string parser may have to perform additional error checking. Use #isUnbounded()
to check if an instance is unbounded (infinite). Or limiting the range using #intersection()
should be enough for most cases.