is-jodd wraps one Jev request in an async isOdd function. Read the license first, then understand inputs, cancellation, and failure handling.
is-jodd is a deliberately impractical npm package: it asks Jev whether a safe integer is odd. The useful learning material is the small API wrapper and its measured tradeoffs. For normal arithmetic, n % 2 !== 0 already answers the question locally. This guide is written by the package publisher and is not official TypeSafe documentation.
Read the license before using the package
is-jodd uses the custom JODD-1T license, not MIT. Its stated terms require $1 trillion and written permission before use, execution, copying, modification, or redistribution unless the copyright holder grants separate terms. Reading the documentation is free. Installation or receipt does not automatically create a charge or debt. Review the actual license, rather than treating a package installation command as permission.
The following describes the interface for readers with appropriate permission. It is not a recommendation to replace normal parity checks with a network service.
Supply the runtime and credential
The package declares Node.js 24 or newer. It exports the named async function isOdd. An API key can come from TYPESAFE_API_KEY or from the apiKey option; an explicitly supplied option takes precedence. Keep real keys out of committed examples and client-side bundles.
import { isOdd } from 'is-jodd';
const result = await isOdd(37, {
signal: AbortSignal.timeout(5000),
});
console.log(result);
This call makes a real request if credentials are configured. The example does not promise which boolean a model will return. The package supplies the question, interprets the response, and exposes cancellation through the provided signal.
Understand accepted inputs
Inputs must pass Number.isSafeInteger. Zero and negative safe integers are accepted. A numeric string, fraction, NaN, infinity, or BigInt is not accepted. If your input begins as form text, validate and convert it deliberately before calling the function; do not assume the package performs general input parsing.
The returned promise can reject because of invalid input, a missing key, a failed HTTP response, cancellation, or malformed answer data. A rejection does not mean the integer is even. Callers should handle that failure separately from a resolved false.
Decide what belongs in your application
The wrapper returns a boolean, not the raw probability or the server’s model metadata. Its strict cutoff is greater than 0.5. If you need those underlying details for an experiment, the direct API quickstart shows where to inspect the response.
Our package comparison documents a smaller runtime entry without claiming faster live requests. The calculator provides a practical parity answer, and errors and timeouts explains the failure cases worth distinguishing in asynchronous code.