How nivaldodasilva/ua-parser-js works
UAParser.js is a small, dependency-free library that turns a user-agent string into browser, engine, operating-system, CPU, and device details. The principal workflow is to supply a string (or use the browser’s current user agent), parse it, and read the structured result. The README documents these distinct detection outputs and a combined result; sampled source shows regex-based matching and browser integration. Unsampled implementation details are not expanded into separate components.
Main entry points: ua-parser.js UAParser
Components 8
Other components
- Library consumer
- UAParser
src/ua-parser.js - Browser details
src/ua-parser.js - Engine details
src/ua-parser.js - OS details
src/ua-parser.js - CPU architecture
src/ua-parser.js - Device details
src/ua-parser.js - Combined result
src/ua-parser.js
Connections 7
- Library consumer → UAParser: supplies user agent
- UAParser → Browser details: extracts
- UAParser → Engine details: extracts
- UAParser → OS details: extracts
- UAParser → CPU architecture: extracts
- UAParser → Device details: extracts
- UAParser → Combined result: returns result