plain-draggable-limit.esm.js
function validPPValue(value) {

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

  return isFinite(value) ? { value: value, isRatio: false } : typeof value === 'string' ? string2PPValue(value.replace(/\s/g, '')) : null;
}
function validPPValue(value) {

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

  return isFinite(value) ? { value: value, isRatio: false } : typeof value === 'string' ? string2PPValue(value.replace(/\s/g, '')) : null;
}
function validPPValue ( value ) { // Get PPValue from string (all `/s` were already removed) function string2PPValue ( inString ) { var matches = / ^(.+?)(%)?$ / . exec ( inString ) ; var value = void 0 , isRatio = void 0 ; return matches && isFinite ( value = parseFloat ( matches [ 1 ] ) ) ? { value : ( isRatio = ! ! ( matches [ 2 ] && value ) ) ? value / 100 : value , isRatio : isRatio } : null ; // 0% -> 0 } return isFinite ( value ) ? { value : value , isRatio : false } : typeof value === 'string' ? string2PPValue ( value . replace ( / \s / g , '' ) ) : null ; }
A value that is Pixels or Ratio
@typedef {{value: number, isRatio: boolean}} PPValue
A value that is Pixels or Ratio