code: function convertViewportValue(value) {
              var mask = /^(\d+)x(\d+)$/,
                  matches;
              if (isString(value) && mask.test(value)) {
                  matches = value.match(mask);
                  return {
                      width: toInteger(matches[1]),
                      height: toInteger(matches[2])
                  };
              } else if (isRegularObject(value) &&
                  value.hasOwnProperty("width") && (value.width >= 1) &&
                  value.hasOwnProperty("height") && (value.height >= 1)
              ) {
                  return {
                      width: toInteger(value.width),
                      height: toInteger(value.height)
                  };
              } else {
                  return undefined;
              }
          }
docs: Convert "WIDTHxHEIGHT" string input to { width: WIDTH, height: HEIGHT }
  Validate and normalize any object input
  Returns undefined for any bad (unconvertable) input
  @param {string|object} value
  @returns {{ width: {number}, height: {number} } | undefined}