add-unit.wxs 240 B

1234567891011121314
  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 = {
  10. addUnit: addUnit
  11. };