string-minify is a minimal Node.js utility (v1.0.1) that removes extra whitespace, tabs, newlines, and trims strings. It's a single-function, zero-dependency module designed for simple string cleanup in Node.js >=8. Unlike full-fledged minifiers (e.g., UglifyJS, Terser), it only collapses whitespace and does not handle code syntax. Released under MIT, it is stable but not actively developed. Suitable for preprocessing text content.
npm install string-minifyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: importing the minifier, passing a multi-line string with extra spaces, and verifying the result.
Consider using a different tool or manually splitting the string before minification.
Upgrade Node.js to version 8 or later.
Add a global type declaration: declare module 'string-minify';
Use default import: import minifier from 'string-minify' or const minifier = require('string-minify');Run: npm install string-minify
Use require('string-minify') instead of import.No dependency data recorded yet.