code: function addMapping(id, mapping) {
          var expanded_id = id.replace(vendorProductRE, function (_, a, b) {
              return (
                  "000".substr(a.length - 1) + a + "-" +
                  "000".substr(b.length - 1) + b + "-"
              );
          });
          var sparse_id = id.replace(vendorProductRE, function (_, a, b) {
              return (
                  a.replace(leadingZeroRE, "") + "-" +
                  b.replace(leadingZeroRE, "") + "-"
              );
          });
  
          // Normalize optional parameters
          mapping.analog = mapping.analog || mapping.buttons.map(function () {
              return -1;
          });
          mapping.normalize_fn = mapping.normalize_fn || defaultNormalizeFn;
  
          remap.set(expanded_id, mapping);
          remap.set(sparse_id, mapping);
      }
docs: Firefox reports different ids for gamepads depending on the platform:
  - Windows: vendor and product codes contain leading zeroes
  - Mac: vendor and product codes are sparse (no leading zeroes)
  
  This function normalizes the id to support both formats
  @ignore