You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this while working on the platform scripts for device list. I wanted to have a CLI argument that can be used to specify the minimum or maximum measurement interval, but don't particularly like multiple arguments for that. I thought using a range, like semver, would be very nice there. After thinking about it, not only for numbers, but also for dates and perhaps other types.
It'd be useful if this also provides a Joiextension, but not yet sure if that would best be in the same package or in a separate package as @vidavidorra/joi-extension-range. I'm leaning towards the latter, for better visibility to the public.
This would be strongly based on semver's ranges. I want to be able to use similar syntax for for number and Date items, where I can write filter strings like >=600, >20 <=80, <2020-03-01 and >=2020-01-01 <2020-02-10.
npm package
@vidavidorra/range
.I ran into this while working on the platform scripts for
device list
. I wanted to have a CLI argument that can be used to specify the minimum or maximum measurement interval, but don't particularly like multiple arguments for that. I thought using a range, like semver, would be very nice there. After thinking about it, not only for numbers, but also for dates and perhaps other types.It'd be useful if this also provides a Joi extension, but not yet sure if that would best be in the same package or in a separate package as
@vidavidorra/joi-extension-range
. I'm leaning towards the latter, for better visibility to the public.This would be strongly based on semver's ranges. I want to be able to use similar syntax for for number and Date items, where I can write filter strings like
>=600
,>20 <=80
,<2020-03-01
and>=2020-01-01 <2020-02-10
.It should support:
It should have comparators:
<
less than;<=
less than or equal to;=
equal;>=
greater than or equal to;>
greater than.Without a comparator,
=
would be assumed.The text was updated successfully, but these errors were encountered: