Skip to content

Instantly share code, notes, and snippets.

@priithaamer
priithaamer / useragent.js
Created July 15, 2011 21:07 — forked from terkel/jquery.ua.js
Node.js User-Agent parser
// Based on fantastic jQuery useragent parser plugin https://gist.github.com/373298
function parse(uaStr) {
var agent = {
platform: {},
browser: {},
engine: {}
};
var ua = uaStr,
p = agent.platform,