1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-04 04:40:05 +02:00

update packages to latest version

This commit is contained in:
s2
2022-08-20 18:51:33 +02:00
parent 09663a35a5
commit 806ebf9a57
4513 changed files with 366205 additions and 92512 deletions

View File

@@ -136,7 +136,7 @@ function formatFrom(source) {
function toHash(string) {
return string
.split(OPTION_SEPARATOR)
.reduce(function (accumulator, directive) {
.reduce(function(accumulator, directive) {
var parts = directive.split(OPTION_NAME_VALUE_SEPARATOR);
var name = parts[0];
var value = parts[1];
@@ -158,7 +158,7 @@ function toHash(string) {
function hashValuesToHash(string) {
return string
.split(HASH_VALUES_OPTION_SEPARATOR)
.reduce(function (accumulator, directive) {
.reduce(function(accumulator, directive) {
var parts = directive.split(HASH_VALUES_NAME_VALUE_SEPARATOR);
var name = parts[0];
var value = parts[1];
@@ -169,43 +169,42 @@ function hashValuesToHash(string) {
}, {});
}
function normalizeValue(value) {
switch (value) {
case FALSE_KEYWORD_1:
case FALSE_KEYWORD_2:
return false;
case TRUE_KEYWORD_1:
case TRUE_KEYWORD_2:
return true;
default:
return value;
case FALSE_KEYWORD_1:
case FALSE_KEYWORD_2:
return false;
case TRUE_KEYWORD_1:
case TRUE_KEYWORD_2:
return true;
default:
return value;
}
}
function mapBreakWith(value) {
switch (value) {
case 'windows':
case 'crlf':
case BreakWith.CarriageReturnLineFeed:
return BreakWith.CarriageReturnLineFeed;
case 'unix':
case 'lf':
case BreakWith.LineFeed:
return BreakWith.LineFeed;
default:
return systemLineBreak;
case 'windows':
case 'crlf':
case BreakWith.CarriageReturnLineFeed:
return BreakWith.CarriageReturnLineFeed;
case 'unix':
case 'lf':
case BreakWith.LineFeed:
return BreakWith.LineFeed;
default:
return systemLineBreak;
}
}
function mapIndentWith(value) {
switch (value) {
case 'space':
return IndentWith.Space;
case 'tab':
return IndentWith.Tab;
default:
return value;
case 'space':
return IndentWith.Space;
case 'tab':
return IndentWith.Tab;
default:
return value;
}
}