nagent

0.0.1 • Public • Published

ua-parser ua-parser

Installation

$ npm install ua-parser

Example

const parse = require('ua-parser');
const ua = parse('Mozilla/5.0 (iPhone; CPU iPhone OS 9_2_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13D15 MicroMessenger/6.3.9 NetType/WIFI Language/zh_CN');
 
// [
//   {
//     "ProductName": "Mozilla",
//     "ProductVersion": "5.0",
//     "SystemInformation": {
//       "Platform": "iPhone",
//       "ReleaseVersion": "CPU iPhone OS 9_2_1 like Mac OS X",
//       "_": []
//     }
//   },
//   {
//     "ProductName": "AppleWebKit",
//     "ProductVersion": "601.1.46",
//     "SystemInformation": {
//       "Platform": "KHTML, like Gecko",
//       "_": []
//     }
//   },
//   {
//     "ProductName": "Mobile",
//     "ProductVersion": "13D15",
//     "SystemInformation": ""
//   },
//   {
//     "ProductName": "MicroMessenger",
//     "ProductVersion": "6.3.9",
//     "SystemInformation": ""
//   },
//   {
//     "ProductName": "NetType",
//     "ProductVersion": "WIFI",
//     "SystemInformation": ""
//   },
//   {
//     "ProductName": "Language",
//     "ProductVersion": "zh_CN",
//     "SystemInformation": ""
//   }
// ]
 

Contributing

  • Fork this Repo first
  • Clone your Repo
  • Install dependencies by $ npm install
  • Checkout a feature branch
  • Feel free to add your features
  • Make sure your features are fully tested
  • Publish your local branch, Open a pull request
  • Enjoy hacking <3

ISC

This work is licensed under the ISC license.


Readme

Keywords

none

Package Sidebar

Install

npm i nagent

Weekly Downloads

2

Version

0.0.1

License

GPL-3.0

Unpacked Size

5.08 kB

Total Files

7

Last publish

Collaborators

  • song940