Strip-Whitespace - a javascript string minifier
Strip-Whitespace will remove extraneous spaces from strings. It's perfect for working with rendering templates (ex. mustache, handlebars) or es6 javascript templates. It works with anything where you might create very long strings.
Before strip-whitespace:
{if conditionconst longString = ' String with some extra spaces ';}
After strip-whitespace:
{if conditionconst longString = ' String with some extra spaces ';}
Command-line usage
$ strip-whitespace --input <input-file> --output <output-file>
Javascript usage
var StripWhitespace = ;// options are optional and can be omittedvar stripWhitespace = options;var result = stripWhitespace;// do things with the codecode = resultcode;
Options
All options are optional
{// following code will answer the question: should this string be stripped of whitespace?if fatStringreturn false;return true;}