package JMAP::Validation::Checks::Number;

use JMAP::Validation::Tests::Number;
use Test2::Bundle::Extended;

use JSON::Typist;

our $is_number = validator(sub {
  my (%params) = @_;

  return (ref($params{got}) || '') eq 'JSON::Typist::Number';
});

our $is_number_or_null = in_set(
  $is_number,
  not_in_set(D()),
);

1;
