title: Detecting device manufacturer (i.e. phone brand) with javascript
body: <p>People have already talked about this issue on
  <a href="https://stackoverflow.com/questions/41671325/how-can-i-find-the-mobile-phone-manufacturer-using-javascript-on-mobile-browser">How can I find the mobile phone manufacturer using javascript on mobile browser</a>
  and
  <a href="https://stackoverflow.com/questions/16356347/detecting-device-brand">Detecting device brand</a></p>
  <p>What I need is a javascript library with a much more &quot;<em>muscular</em>&quot; device code library than the current version of platform.js</p>
  <p>For instance I have this SONY phone and when I run <code>window.navigator.userAgent;</code> it returns the device name as <code>F3311</code> (sadly platform.js doesn't recognize that). And that means another model from SONY would appear with another device code. There is also HUAWEI and XIAOMI and many other brands.</p>
  <p>Is there a javascript library out there with which I can use a sample piece of code like this:</p>
  <pre><code>if(userDevice == SONY)
  {
  //do stuff that is supported by Sony phones only, etc
  }
  else if (userDevice == HUAWEI)
  {
  //show stuff that will appear only on Huawei phones, etc
  }
  </code></pre>
  <p>These might be useful,
  <a href="http://gs.statcounter.com/vendor-market-share/mobile" rel="nofollow noreferrer">http://gs.statcounter.com/vendor-market-share/mobile</a> and <a href="https://www.idc.com/promo/smartphone-market-share/vendor" rel="nofollow noreferrer">https://www.idc.com/promo/smartphone-market-share/vendor</a></p>
  <blockquote>
  <p>EDIT 1: I have found this <a href="https://deviceatlas.com/products/web" rel="nofollow noreferrer">https://deviceatlas.com/products/web</a> but I don't know if they are offering just what I need. I will inquire.</p>
  </blockquote>