Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function carriedStyled() {
const strs = arguments[0];
styles = null;
if (!isTemplateLiteral(strs)) {
styles = create(Array.prototype.slice.call(arguments));
set([styles]);
return taggedStyled;
}
return taggedStyled.apply(null, arguments);
}
const code = String.raw({raw: str}, ...values);
const isMixin = checkMixin(code);
parsed = parse(code, cacheKey, {
elements,
attributes,
classes,
onlyNamespaced,
isMixin,
});
if (!isMixin) {
__css__(parsed.css, cacheKey);
}
parsed.tokens = create([parsed.tokens].concat(mixinTokens));
parsed.tokens[KEYS.__hash__] = cacheKey;
parsed.tokens[KEYS.__css__] = parsed.css;
cache[cacheKey] = parsed;
}
const tokens = Object.create(cache[cacheKey].tokens);
tokens[KEYS.__style__] = Object.assign(vars, mixinVars);
return tokens;
}