{"slug": "jev-leftpad", "title": "Jev-Leftpad", "summary": "A developer published jev-leftpad, an npm package that left-pads a string by calling the jev-latest model through TypeSafe's @typesafe-ai/sdk instead of JavaScript's built-in padStart(). The package requires Node.js 20 or newer and a TYPESAFE_API_KEY, issues one TypeSafe API request per call with retries disabled, and can add only 0 to 10 spaces because Jev is given criteria named space_0 through space_10; the author states it costs more than padStart() and warns against using it in production. The tests mock Jev, need no API key, and spend no TypeSafe credits, and the project is MIT licensed.", "body_md": "Left pad a value with Jev.\n\nCould this be one line with `padStart()`? Yes. Does it need a model call? No.\nAnyway:\n\n```\nnpm install jev-leftpad\npython\nimport leftPad from 'jev-leftpad';\n\nconst result = await leftPad('jev', 8);\n\nconsole.log(JSON.stringify(result));\n// \"     jev\" (probably)\n```\n\nSet `TYPESAFE_API_KEY` before using it. `jev-leftpad` uses `jev-latest` through\nTypeSafe's native [`@typesafe-ai/sdk`](https://docs.typesafe.ai/sdk/javascript).\nIt requires Node.js 20 or newer.\n\n```\nawait leftPad(value, targetLength)\n```\n\n`targetLength` must be a non-negative safe integer.\n\nJev gets one Choice with criteria named `space_0`, `space_1`, `space_2`, and so\non, written directly up to `space_10`. For the example above, it should choose\n`space_5`. JavaScript reads the number, creates five spaces, and puts the value\nafter them.\n\nThis means the package can add between 0 and 10 spaces. If more than 10 spaces are needed, Jev has no correct option. Which feels appropriate for this project.\n\nThere is one TypeSafe API request per call and retries are disabled. The request\ncan fail, Jev can choose the wrong option, and it costs more than `padStart()`.\nPlease don't use this in production. Or anything important.\n\n```\nnpm install\nnpm test\n```\n\nThe tests mock Jev. They don't need an API key and don't spend any TypeSafe credits.\n\nMIT", "url": "https://wpnews.pro/news/jev-leftpad", "canonical_source": "https://github.com/f/jev-leftpad", "published_at": "2026-09-21 08:39:32+00:00", "updated_at": "2026-09-21 09:52:29.848694+00:00", "lang": "en", "topics": ["ai-tools", "ai-products", "developer-tools", "large-language-models"], "entities": ["jev-leftpad", "Jev", "TypeSafe", "@typesafe-ai/sdk", "Node.js", "npm"], "alternates": {"html": "https://wpnews.pro/news/jev-leftpad", "markdown": "https://wpnews.pro/news/jev-leftpad.md", "text": "https://wpnews.pro/news/jev-leftpad.txt", "jsonld": "https://wpnews.pro/news/jev-leftpad.jsonld"}}