Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
msgs.forEach(m => {
const parsed = ansi.parse(m)
console.log(...parsed.asChromeConsoleLogArguments)
})
}
static getDerivedStateFromProps(props: Props, state: State) {
if (props.value === state.prevValue) {
return null;
}
const parsed = ansicolor.parse(props.value);
return {
chunks: parsed.spans.map(span => {
return span.css
? {
style: convertCSSToStyle(span.css),
text: span.text,
}
: { text: span.text };
}),
prevValue: props.value,
};
}