add-unit.wxs 227B

12345678910111213
  1. /* eslint-disable */
  2. var REGEXP = getRegExp('^-?\d+(\.\d+)?$');
  3. function addUnit(value) {
  4. if (value == null) {
  5. return undefined;
  6. }
  7. return REGEXP.test('' + value) ? value + 'px' : value;
  8. }
  9. module.exports = addUnit;