Skip to content
library for Node to parse user agents
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
LICENSE.md
README.md
index.js
package.json

README.md

Node User Agent Parse

NPM

Build Status

Build Status

Overview

Parse user agents a bit like PHP's get_browser(). Rudimentary but it works.

Example

     var userAgent = require('user-agent')
     userAgent.parse('Mozilla/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/526.9 (KHTML, like Gecko) Version/4.0dp1 Safari/526.8')
     // => { name: 'safari', version: '4.0dp1', os: 'Windows XP', full: '... same string as above ...', device_type:'desktop' }

Credits

Heavily based on (blatantly ripped from ahem) https://github.com/soldair/node-ua-device-type and https://github.com/jujhars13/node-user-agent-parse

TODO

Implemnet tests using mocha and should

License

License is MIT, go nuts.

Something went wrong with that request. Please try again.