Essentially would it be possible to add an "is_int()" function similar to the "is_number()" function? The exact implementation could vary, (both of the below are mentioned in the above link):
one option would be to return true if the contained number can be exactly represented as an integer. (ie all ints return true, for doubles, round, check equality).
a second option would be to add another enum for int encoded types then return true for is_number() if tag is either int or number, and is_int return true for int tag only.
for both of these some small modification would be needed for the shape checking also.
I'm happy to create a pull request for either of these options.
As I understand it while javascript type system does not strictly differentiate between "number" and "integer" the JSON schema does (https://spacetelescope.github.io/understanding-json-schema/reference/numeric.html).
Essentially would it be possible to add an "is_int()" function similar to the "is_number()" function? The exact implementation could vary, (both of the below are mentioned in the above link):
one option would be to return true if the contained number can be exactly represented as an integer. (ie all ints return true, for doubles, round, check equality).
a second option would be to add another enum for int encoded types then return true for is_number() if tag is either int or number, and is_int return true for int tag only.
for both of these some small modification would be needed for the shape checking also.
I'm happy to create a pull request for either of these options.