unjs/knitwork

🧶 Utilities to generate safe JavaScript code.

70
/ 100
Verified

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.

No Dependents
Maintenance 13 / 25
Adoption 20 / 25
Maturity 25 / 25
Community 12 / 25

How are scores calculated?

Stars

315

Forks

17

Language

TypeScript

License

MIT

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.