Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public setProperty (propertyName: string, value?: string | null) {
propertyName = toCamelCase(propertyName)
if (isUndefined(value)) {
return
}
if (value === null || value === '') {
this.removeProperty(propertyName)
} else {
this[propertyName] = value
}
}
public getPropertyValue (propertyName: string) {
propertyName = toCamelCase(propertyName)
const value = this[propertyName]
if (!value) {
return ''
}
return value
}
}
public removeProperty (propertyName: string): string {
propertyName = toCamelCase(propertyName)
if (!this._usedStyleProp.has(propertyName)) {
return ''
}
const value = this[propertyName]
this[propertyName] = ''
this._usedStyleProp.delete(propertyName)
return value
}