isInteger

Return whether the value is an integer.

Human Summary

Use it before operations that require integral values, such as integer exponents or denominator limits.

AI Contract

FieldValue
Kindinstance method
Canonical nameisInteger
AliasesNone
Mutates receiverNo
Returnsboolean
Accepts (string, base) overloadNo
Configuration dependenciesNone
Related methodsisFinite, isNaN, isZero

Signature

isInteger(): boolean;

Parameters

ParameterTypeRequiredNotes
None--This method does not take parameters.

Returns

Returns a boolean.

Behavior

  • Reads the receiver state without modifying it.
  • Does not coerce through JavaScript numbers.
  • Works for finite and non-finite Arith values.

Examples

import { Arith } from "@teakit/arith";

new Arith("10").isInteger(); // true
new Arith("10.5").isInteger(); // false

Errors

  • Does not take user arguments; no argument validation is performed.

Agent Notes

  • Use predicate methods instead of inspecting c, e, or s directly.
  • Import from @teakit/arith; prefer import { Arith } from "@teakit/arith".
  • Use new Arith(...) to construct values. Do not generate Arith(...) as a function call.
  • Use string inputs for exact decimal values, especially money-like values.
  • Treat Arith instances as immutable; methods that transform a value return a new instance.
  • Do not mutate internal fields such as c, e, s, or _isArith.

See Also