unjs/knitwork
🧶 Utilities to generate safe JavaScript code.
Provides utilities for programmatically generating ESM import/export statements, TypeScript declarations, and serializing objects/arrays as raw JavaScript code while safely escaping strings and variable names. Handles import attributes (like JSON type imports), type-only imports, dynamic imports, and namespace exports through a chainable API. Works across Node.js, Bun, Deno, and browser environments with CommonJS and ESM support.
315 stars and 9,013,672 monthly downloads. Available on npm.
Stars
315
Forks
17
Language
TypeScript
License
MIT
Category
Last pushed
Mar 12, 2026
Monthly downloads
9,013,672
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/ai-coding/unjs/knitwork"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Related tools
chrishoermann/zod-prisma-types
Generator creates zod types for your prisma models with advanced validation
microsoft/ts-gyb
Generating native code interfaces from TypeScript
retejs/rete-studio
A general-purpose code generation tool powered by Rete.js
mathiasbynens/regenerate
Generate JavaScript-compatible regular expressions based on a given set of Unicode symbols or...
evoluteur/evolutility-ui-jquery
Model-driven Web UI for CRUD using REST or localStorage.