Total Complexity | 2 |
Complexity/F | 2 |
Lines of Code | 7 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import MobileDetect from 'mobile-detect' |
||
2 | |||
3 | export default ({ req }, inject) => { |
||
4 | const userAgent = process.server ? req.headers['user-agent'] : window.navigator.userAgent |
||
5 | const md = new MobileDetect(userAgent) |
||
6 | inject('md', md) |
||
7 | } |
||
8 |