# is-odd-jev

> Check whether a number is odd, using a System One model, with a calibrated probability.

Latest version **1.1.0** (published 2026-09-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-odd-jev
pnpm add is-odd-jev
yarn add is-odd-jev
bun add is-odd-jev
```

Provides the command `is-odd-jev`.

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2026-09-17 |
| First published | 2026-09-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | alxcrt |
| Maintainers | alexcretu |
| Keywords | is-odd, odd, even, jev, typesafe, system-one, noul |

## Links

- npm: https://www.npmjs.com/package/is-odd-jev
- Repository: https://github.com/alxcrt/is-odd-jev
- Homepage: https://github.com/alxcrt/is-odd-jev#readme
- Issues: https://github.com/alxcrt/is-odd-jev/issues
- npm.io page: https://npm.io/package/is-odd-jev

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.1.0 (latest) — 2026-09-17
- 1.0.0 — 2026-09-17

## README

# is-odd-jev

Check whether a number is odd, using a System One model, with a calibrated probability.

```sh
npm i is-odd-jev
```

```js
const isOdd = require('is-odd-jev');

await isOdd(5);
// { odd: true, p: 0.999, ms: 71, output_tokens: 3 }

await isOdd(4);
// { odd: false, p: 0.002, ms: 88, output_tokens: 3 }
```

```sh
npx is-odd-jev 5
```

## Why

`is-odd` (2014) returns a boolean. It cannot tell you how sure it is.

`is-odd-ai` (2023) asks an LLM, which returns a string you then parse, and which will
happily invent a confidence score if you ask it for one.

`is-odd-jev` returns `p` — the model's actual probability that `n` is odd, computed
from the distribution rather than narrated. Jev's `Noul` primitive has no `confidence`
field, because the probability *is* the answer. If you need a symmetric certainty:

```js
const { odd, p } = await isOdd(n);
const confidence = Math.abs(p - 0.5) * 2;
```

Which lets you do the thing you could never do with an LLM:

```js
if (confidence >= 0.95) ship(odd);
else escalateToHuman(n);
```

Pick that threshold by measuring it on a held-out set, not by intuition.

## Setup

Node 18+. Zero dependencies.

| env | default |
|---|---|
| `TYPESAFE_API_KEY` | — |
| `AI_GATEWAY_API_KEY` | — (fallback, see below) |
| `TYPESAFE_BASE_URL` | `https://api.typesafe.ai` |
| `TYPESAFE_DEFAULT_MODEL` | `jev-latest` |

## Without a TypeSafe key

Direct TypeSafe keys are waitlisted. [Vercel AI Gateway](https://vercel.com/docs/ai-gateway)
serves the same model as `typesafe-ai/jev` with no waitlist, so this works instead:

```sh
export AI_GATEWAY_API_KEY=...
npx is-odd-jev 5
```

`TYPESAFE_API_KEY` wins if both are set. Two things genuinely differ through the gateway:

- **Probabilities come back rounded**, usually to 2dp — you get `0.99`, not `0.999`.
- **The free tier is rate-limited hard** on this model. Fine for one number, not for a loop.

Under the hood the gateway calls a `Noul` a `boolean` and its answer `probability`,
and takes the model in a header rather than the body. This package handles that; if
you are calling it yourself, `experimental_evaluate` from `ai@7` speaks it natively:

```js
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state: { n: 5 },
  questions: { odd: { type: 'boolean', instructions: 'Is n odd?' } },
});
```

## What it sends

```json
{
  "model": "jev-latest",
  "state": { "n": 5 },
  "questions": { "odd": { "type": "noul", "instructions": "Is n odd?" } }
}
```

It cannot chat. It cannot explain itself. It cannot hallucinate. It can only tell you,
with a calibrated probability, that five is odd.

## Prior art

- `is-odd` — depends on `is-number`. `is-even` depends on `is-odd`.
- `is-odd-ai` — asks GPT, parses the reply.
- `n % 2 === 1` — still correct, still 0 ms, still free.

MIT

---
_Source: https://npm.io/package/is-odd-jev · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
