code: function (uastring, extensions) {
  
          if (!(this instanceof UAParser)) {
              return new UAParser(uastring, extensions).getResult();
          }
  
          var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY);
          var rgxmap = extensions ? util.extend(regexes, extensions) : regexes;
  
          this.getBrowser = function () {
              var browser = mapper.rgx.apply(this, rgxmap.browser);
              browser.major = util.major(browser.version);
              return browser;
          };
          this.getCPU = function () {
              return mapper.rgx.apply(this, rgxmap.cpu);
          };
          this.getDevice = function () {
              return mapper.rgx.apply(this, rgxmap.device);
          };
          this.getEngine = function () {
              return mapper.rgx.apply(this, rgxmap.engine);
          };
          this.getOS = function () {
              return mapper.rgx.apply(this, rgxmap.os);
          };
          this.getResult = function() {
              return {
                  ua      : this.getUA(),
                  browser : this.getBrowser(),
                  engine  : this.getEngine(),
                  os      : this.getOS(),
                  device  : this.getDevice(),
                  cpu     : this.getCPU()
              };
          };
          this.getUA = function () {
              return ua;
          };
          this.setUA = function (uastring) {
              ua = uastring;
              return this;
          };
          this.setUA(ua);
          return this;
      }
docs: /////////////// Constructor //////////////