Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function setStyle (style: Style, key: string, value: string | number) {
style[key] =
isNumber(value) && IS_NON_DIMENSIONAL.test(key) === false
? value + 'px'
: value == null
? ''
: value
}