13 lines
227 B
Plaintext
13 lines
227 B
Plaintext
|
/* eslint-disable */
|
||
|
var REGEXP = getRegExp('^-?\d+(\.\d+)?$');
|
||
|
|
||
|
function addUnit(value) {
|
||
|
if (value == null) {
|
||
|
return undefined;
|
||
|
}
|
||
|
|
||
|
return REGEXP.test('' + value) ? value + 'px' : value;
|
||
|
}
|
||
|
|
||
|
module.exports = addUnit;
|