# Developer replaces padStart() with an AI model call to left-pad strings

Original title: Jev-Leftpad

> Hacker News story 49784706 · language: en · submitted 2026-09-21
> Web version: https://zeli.app/story/49784706
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 232 · by [fka](<https://news.ycombinator.com/user?id=fka>) · 💬 87
[original](<https://github.com/f/jev-leftpad>) · [HN discussion](<https://news.ycombinator.com/item?id=49784706>)

## Summary

Fatih Kadir Akın's jev-leftpad is a JavaScript package that left-pads a value by asking TypeSafe AI's Jev model which option to pick, with criteria named space_0 through space_10. It needs a TYPESAFE_API_KEY, Node.js 20+, and one API request per call with retries disabled. The README admits padStart() could do it in one line and warns against using it in production — or anything important.

## Key quote

> Could this be one line with padStart()? Yes. Does it need a model call? No. Anyway:

## HN discussion (87 comments)

### [sethaurus](<https://news.ycombinator.com/item?id=49785360>)

> I have to be honest. While this is obviously a smart and useful idea, it misses one of the core features of Jev: its confidence scores. Partial confidence could easily be mapped to fractional spaces, using unicode characters like U+2009: THIN SPACE. As it stands, this package is not harnessing the full power of Jev.

### [ckastner](<https://news.ycombinator.com/item?id=49785928>)

> Can't believe it's already been 10 years...
>
> https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/

### [hanspagel](<https://news.ycombinator.com/item?id=49786351>)

> This is funny, because I just implemented the same feature, but mine is calling OpenAI’s Astra on High (very capable for this kind of feature).
>
> It works great, but maybe your implementation could save me some money. I’ll test it and report back.

### [fwlr](<https://news.ycombinator.com/item?id=49785444>)

> The tests mock Jev. 
>
> 10/10 no notes

### [throwa356262](<https://news.ycombinator.com/item?id=49787467>)

> I think some people are missing the joke here
>
> https://en.wikipedia.org/wiki/Npm_left-pad_incident

---

## Cite

- Page: https://zeli.app/story/49784706
- Date: 2026-09-21
- Source: github.com (https://github.com/f/jev-leftpad)
- Hacker News: https://news.ycombinator.com/item?id=49784706

## Other languages

- zh: https://zeli.app/zh/story/49784706 · markdown: https://zeli.app/zh/story/49784706.md
- ja: https://zeli.app/ja/story/49784706 · markdown: https://zeli.app/ja/story/49784706.md
- ko: https://zeli.app/ko/story/49784706 · markdown: https://zeli.app/ko/story/49784706.md
- de: https://zeli.app/de/story/49784706 · markdown: https://zeli.app/de/story/49784706.md
- es: https://zeli.app/es/story/49784706 · markdown: https://zeli.app/es/story/49784706.md
- ru: https://zeli.app/ru/story/49784706 · markdown: https://zeli.app/ru/story/49784706.md
