Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function isChildren(x: any): boolean {
return isStringOrNumber(x) || (x && isArray(x));
}
export function renderStylesToString(styles: string | object): string {
if (isString(styles)) {
return styles;
} else {
let renderedString = '';
for (const styleName in styles) {
const value = styles[styleName];
if (isStringOrNumber(value)) {
renderedString += `${styleName}:${value};`;
}
}
return renderedString;
}
}