1.0.1 • Published 10 years ago
user-friendly v1.0.1
user-friendly
User friendly user agent querying
Install
$ npm install user-friendly
API
var UserFriendly = require('user-friendly')
var str = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36'
var uf = UserFriendly(str)
console.log(uf.browser())
// => 'Chrome 41.0.2227'
console.log(uf.os())
// => 'Mac OS X 10.10.1'
See test/fixtures.json for other examples of expected output
Author
Evan Lucas
License
MIT (See LICENSE
for more info)