jts-minify v2.5.14 is a utility for minifying JavaScript and TypeScript files. It works as a CLI tool and a library, offering basic minification features like removing whitespace, comments, and optionally encoding output as base64. The package is stable with weekly downloads under 500, and has no notable alternatives in the npm ecosystem for combined JS/TS minification. Its key differentiator is the base64 encoding option, which is uncommon in minifiers.
npm install jts-minifyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to minify strings and files, with and without base64 encoding option.
Switch to ES module import syntax and ensure project uses ESM.
Trim the result: result.trim() or use replace(/\n$/, '').
Always specify a different output filename or manually back up the original.
Rename option to `minifyOptions`.
Use import syntax or rename file to .mjs, or set "type": "module" in package.json.
Use `import { jtsMinify } from 'jts-minify'` instead of `import jtsMinify from 'jts-minify'`.Ensure the input file path is correct and the file exists before calling minifyFile.
No dependency data recorded yet.