userAgent string parser
# indtall
$ npm i -S @eos/user-agent
and
// in your javascript file
import UserAgent from '@eos/user-agent'
const UA = new UserAgent()
or pass a user agent string
const UA = new UserAgent('Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0')
<script src="dist/userAgent.min.js"></script>
<script>
const UA = new UserAgent()
</script>
- type: String
- value: 'Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0'
- type: String
- value: 'Linux', 'Windows', 'Mac', 'Android', 'iOS', 'Chrome OS'
- type: String
- value: '0.0.0'
- type: String
- value: 'en', 'zh', ....
- type: Boolean
- type: Boolean
- type: Boolean
- type: Boolean
- type: Boolean
- type: Boolean
- type: Boolean
- type: Boolean
- type: Boolean
- type: String
- value: 'Firefox', 'Chrome', 'Edge', 'IE', 'Chrome for iOS', 'Safari', 'WebKit'
- type: String
- value: 'Gecko', 'Chromium', 'Edge', 'Trident', 'WebKit'
- type: String
- value: '63.0.0'
- type: Boolean
- type: Boolean
- type: Boolean
- type: Boolean
- type: Boolean
- type: Boolean
- type: Boolean
- type: Boolean