0.0.1 • Published 6 years ago

@song940/ua-parser v0.0.1

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
6 years ago

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.