code: function string2PPValue(inString) {
      const matches = /^(.+?)(%)?$/.exec(inString);
      let value, isRatio;
      return matches && isFinite((value = parseFloat(matches[1])))
        ? {value: (isRatio = !!(matches[2] && value)) ? value / 100 : value, isRatio} : null; // 0% -> 0
    }
docs: Get PPValue from string (all `/s` were already removed)