How it uses Jev
The function sends `{value, targetLength}` as Jev state and asks a typed `choice` question with options `space_0` through `space_10`. JavaScript extracts the chosen count, repeats spaces that many times, and prefixes the value; the code does not independently verify the choice is correct.
What Jev decides
How many spaces are needed before value to reach targetLength?
The value to pad and its target length.
- space_0
- space_1
- space_2
- space_3
- space_4
- space_5
- space_6
- space_7
- space_8
- space_9
- space_10
App workflow
- Validate the target length
Reject values that are not non-negative safe integers before making a request.
- Ask Jev for a count
Send the value and target length with a Choice question whose criteria enumerate 0–10 spaces; retries are disabled.
- Convert the selected option
Parse the numeric suffix from the selected choice, repeat that many spaces, and prepend them to the value.
Why it is interesting
It is a compact example of consuming a categorical Jev answer as a program value. Its 0-to-10 option limit and acknowledged risk of a wrong choice make the boundary of that approach visible.