Skip to content

jev-leftpad

Deliberately silly npm package that left-pads a string by asking Jev to choose how many spaces to add.

ProjectprototypeMIT

Overview

jev-leftpad is a joke package that left-pads a value using Jev. It asks one Choice question whose options are space_0 through space_10; Jev should pick the right number of spaces, and JavaScript builds the padding. The README openly says padStart() does this in one line without a model call.

It can add between 0 and 10 spaces only, makes one TypeSafe request per call with retries disabled, can fail or pick the wrong option, and costs more than the built-in. The author asks people not to use it in production. Tests mock Jev and need no key.

What the decision model decides

TypeQuestionAnswers
ChoiceHow many spaces should be added?space_0 · space_1 · space_2 · space_3 · space_4 · space_5 · space_6 · space_7 · space_8 · space_9 · space_10

How it works

  1. Call leftPad(value, targetLength)
  2. Ask Jev to choose a number of spaces
  3. Build the padded string in JavaScript

Strengths

  • Illustrates Choice in a tiny example

Caveats

  • Joke package; use padStart()
  • Limited to 10 spaces
  • Can be wrong and costs an API call

Getting started

`npm install jev-leftpad`, set TYPESAFE_API_KEY, then `await leftPad('jev', 8)`.

At a glance

Type
Project
Status
prototype
Language
JavaScript
Runtime
Node 20+ library
Has code
yes
Has tests
yes
License
MIT

Use cases and integrations

How curated lists describe it

Frequently asked questions

Should I use this?

No, the author says not to use it for anything important.

How does it work?

Jev chooses how many spaces to add from 0 to 10.

Do tests call the API?

No, they mock Jev.

Related projects

  • Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.

    MCP serverproductionTypeScript
  • Ax, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.

    PluginproductionTypeScript
  • Effect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.

    ProjectproductionTypeScript
  • PHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.

    ProjectproductionPHP
  • Go MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.

    MCP serverproductionGo
  • Simon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.

    PluginproductionPython