Skip to content

Jev directory

CommunityJev Cookbooks

Jev Leftpad

A joke npm package that left-pads a string by asking Jev to choose among space_0 through space_10 in one Choice, spending a model call where padStart() would do.
Stars
84
Language
JavaScript
License
MIT
Reading time
2 min
Published by
Community
Author
f
Last verified
Sep 2026

f/jev-leftpad

User repository on GitHub

View on GitHub

Left-pad strings with TypeSafe AI's Jev. For reasons.

Forks
5
Last pushed
Updated Sep 2026

Repo stats from the GitHub API, cached Oct 2026.

About this project

Left pad a value with Jev. Could this be one line with padStart()? Yes. Does it need a model call? No. Anyway: Set TYPESAFEAPIKEY before using it. jev-leftpad uses jev-latest through TypeSafe's native @typesafe-ai/sdk. It requires Node.js 20 or newer. targetLength must be a non-negative safe integer.

Quoted from the project's README. Read the full README.

Highlights

  • Each call sends one Choice with criteria named space_0 through space_10; JavaScript then creates the chosen number of spaces.
  • It can add between 0 and 10 spaces only, and the README notes Jev has no correct option beyond ten.
  • One TypeSafe API request per call with retries disabled; the README says not to use it in production or anything important.
  • Uses jev-latest through the official @typesafe-ai/sdk and requires Node.js 20 or newer and TYPESAFE_API_KEY.

Quickstart

ts
import leftPad from 'jev-leftpad';

const result = await leftPad('jev', 8);
console.log(JSON.stringify(result));

Watch out

MIT-licensed. Needs Node.js 20+ and TYPESAFE_API_KEY, makes a paid API request per call, and is explicitly a joke package.

Questions about this entry

Short answers drawn from the linked project or page.

From the Jev guides

Original write-ups on what this entry is for.

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai