Shape definition for numeric values.
Constraints for the number shape factory.
Constraints for numeric shape factories.
Checks whether a value is a NumberShape.
Checks whether a value is a valid NumberConstraints object.
Checks whether a value is a valid NumericConstraints object.
Creates a numeric shape.
Creates a shape for 8-bit signed integer values.
Creates a shape for 16-bit signed integer values.
Creates a shape for 32-bit signed integer values.
Creates a shape for 64-bit signed integer values.
Creates a shape for IEEE 754 single-precision floating-point values.
Creates a shape for IEEE 754 double-precision floating-point values.
Creates a shape for arbitrary-precision integer values.
Creates a shape for arbitrary-precision decimal values.
Numeric shape model and factories.
Defines shapes and factories for validating numeric values, mapping the JSON number type to XSD 1.1 numeric datatypes.
Factories check structural integrity of constraints but not their logical consistency: contradictory constraints like
minInclusive > maxInclusivewon't be rejected.¹ XSD 1.1 datatypes are referenced by RDF 1.1 and JSON-LD 1.1 as normative
² Numeric types with ranges exceeding JavaScript's safe integer range (±2⁵³-1) or requiring arbitrary precision cannot be fully represented in JSON/JavaScript
Compatibility
Defining Numeric Shapes
Typed Numeric Factories
Specialised factories map to XSD numeric datatypes with predefined precision:
Using in Resource Shapes
See