Node.js user-agent parse user agent String

Description

Node.js user-agent parse user agent String


console.log('npm install user-agent\n');

var userAgent = require('user-agent');
var ua='Mozilla/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/526.9 (KHTML, like Gecko) Version/4.0dp1 Safari/526.8';

console.log(ua);//from ww  w. ja  v  a2 s . com
console.dir(userAgent.parse(ua));



Previous

Related