You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
250 B
16 lines
250 B
function addUnit(value) {
|
|
if (value == null) {
|
|
return ""
|
|
}
|
|
|
|
if (typeof value === "string" && value.indexOf("var") > -1) {
|
|
return value
|
|
}
|
|
|
|
if (value >= 0) return value + "px"
|
|
return value
|
|
}
|
|
|
|
module.exports = {
|
|
addUnit: addUnit
|
|
}
|