Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const addDefinition = atRule => {
let matches;
while ((matches = matchValueDefinition.exec(atRule.params))) {
let [, /*match*/ key, value] = matches;
// Add to the definitions, knowing that values can refer to each other
definitions[key] = ICSSUtils.replaceValueSymbols(value, definitions);
atRule.remove();
}
};
const addExports = (node, name, value) => {
if (isForbidden(name)) {
result.warn(`Dot and hash symbols are not allowed in value "${name}"`, {
node
});
}
if (valuesExports[name]) {
result.warn(`"${name}" value already declared`, { node });
}
valuesExports[name] = replaceValueSymbols(value, valuesExports);
};
Object.entries(icssExports).forEach(([key, rawValue]) => {
const value = replaceValueSymbols(rawValue, importedValues)
result.messages.push({
plugin,
type: 'export',
item: { key, value },
})
})
}
Object.keys(icssExports).forEach(key => {
icssExports[key] = replaceValueSymbols(icssExports[key], scopedAliases);
});