Choice selects an option; Noul evaluates a yes/no proposition. The difference changes the payload and the decoder, but does not prove a speed advantage.
Choice and Noul offer different answer shapes. TypeSafe documents Choice as selecting from named options, with an answer containing the selected option, option probabilities, and confidence. Noul represents a yes/no judgment with a single numeric value. Decide which information the caller needs before choosing the question type. This is an unofficial comparison. Choice reference
Compare two concrete implementations
is-jeven 1.0.0 asks whether a number is even using a Choice question whose options are the strings true and false. Its decoder checks the selected string and returns a JavaScript boolean. is-jodd 1.0.0 asks whether the number is odd using Noul, then returns whether the numeric answer exceeds 0.5.
These are excerpts of the question definitions, shown to compare the contracts:
const evenQuestion = {
type: 'choice',
instructions: 'Is this number even?',
criteria: { true: null, false: null },
};
const oddQuestion = {
type: 'noul',
instructions: 'Is this integer odd?',
};
The public boolean interfaces look similar, but their requests and internal decoders differ. A benchmark comparing the complete packages therefore changes more than the presence of a negation operator.
Choose according to the decision
Suppose an original application needs to label a calendar item as meeting, reminder, or unavailable time. Those named outcomes suggest a categorical contract. If it only needs to ask whether the item contains a meeting link, a yes/no contract may be sufficient. These are design examples, not claims about Jev’s accuracy on calendar data.
Write down the output your downstream function actually consumes. If it immediately collapses several categories into one boolean, investigate whether those categories serve another purpose. Conversely, if it needs to display or analyze individual categories, collapsing everything early can discard useful information.
Also decide how to represent a failed request. Neither a missing Choice option nor a malformed Noul number should become a normal business answer merely to satisfy a boolean interface.
Measure the whole change honestly
Our recorded package comparison found 51 fewer serialized request-body bytes for is-jodd across its tested inputs. The live experiment did not establish a consistent latency advantage. That distinction prevents a reasonable schema simplification from turning into an unsupported claim that one primitive is universally faster.
The benchmark results explain the paired measurements and their limits. The smaller requests article separates JSON bytes from download size and elapsed time. For exact parity, use the calculator or local arithmetic.
Both packages have zero runtime dependencies. is-jodd additionally carries its own restrictive JODD-1T terms: $1 trillion and written permission before use unless separate terms are granted. Its availability as an npm package does not make those terms MIT or permissive.