format: prettify entire project
This commit is contained in:
15
node_modules/clean-css/lib/optimizer/level-2/remove-duplicates.js
generated
vendored
15
node_modules/clean-css/lib/optimizer/level-2/remove-duplicates.js
generated
vendored
@ -11,15 +11,12 @@ 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 +29,8 @@ 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