JavaScript module to check if user agent to return the device and browser.
npm install device-detectDevice Detect
=============
JavaScript module to check if user agent to return the device and browser.
``js`
npm install device-detect --save-dev
`js
var deviceDetect = require('device-detect')();
// return all device and browser object
console.log(deviceDetect);
// result example:
/* {
"device":"Macintosh",
"browser":"Chrome"
} */
console.log(deviceDetect.device); // returns Macintosh
console.log(deviceDetect.browser); // returns Chrome
`
Browsers:
- Chrome
- Opera
- Firefox
- IE
- Safari
3. Run Grunt watch grunt watch
4. Create your feature branch (git checkout -b my-new-feature)
5. Commit your changes (git commit -am "Add some feature")
6. Push to the branch (git push origin my-new-feature`)