This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/csso/lib/clean/Operator.js

15 lines
407 B
JavaScript
Raw Normal View History

2019-08-11 18:48:02 +00:00
// remove white spaces around operators when safe
module.exports = function cleanWhitespace(node, item, list) {
if (node.value === '+' || node.value === '-') {
return;
}
if (item.prev !== null && item.prev.data.type === 'WhiteSpace') {
list.remove(item.prev);
}
if (item.next !== null && item.next.data.type === 'WhiteSpace') {
list.remove(item.next);
}
};