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:
13
node_modules/clean-css/lib/optimizer/level-2/remove-duplicates.js
generated
vendored
13
node_modules/clean-css/lib/optimizer/level-2/remove-duplicates.js
generated
vendored
@@ -11,15 +11,11 @@ function removeDuplicates(tokens) {
|
||||
|
||||
for (var i = 0, l = tokens.length; i < l; i++) {
|
||||
token = tokens[i];
|
||||
if (token[0] != Token.RULE)
|
||||
continue;
|
||||
if (token[0] != Token.RULE) { continue; }
|
||||
|
||||
id = serializeRules(token[1]);
|
||||
|
||||
if (matched[id] && matched[id].length == 1)
|
||||
moreThanOnce.push(id);
|
||||
else
|
||||
matched[id] = matched[id] || [];
|
||||
if (matched[id] && matched[id].length == 1) { moreThanOnce.push(id); } else { matched[id] = matched[id] || []; }
|
||||
|
||||
matched[id].push(i);
|
||||
}
|
||||
@@ -32,10 +28,7 @@ function removeDuplicates(tokens) {
|
||||
token = tokens[matched[id][j]];
|
||||
body = serializeBody(token[2]);
|
||||
|
||||
if (bodies.indexOf(body) > -1)
|
||||
token[2] = [];
|
||||
else
|
||||
bodies.push(body);
|
||||
if (bodies.indexOf(body) > -1) { token[2] = []; } else { bodies.push(body); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user