1.0.3 • Published 11 months ago

freon-user-agent v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
11 months ago

user-agent

Freon plugin to parse the user agent header

Installation:

npm install user-agent

Usage:

// ... create a Freon application ...

app.plugin(require('user-agent'));

Properties added to the request object

  • userAgent: Object - parsed user agent header

This should be object similar to

{
	ua: "...",
	browser: {
		name: "...",
		version: "..."
	},
	engine: {
		name: "...",
		version: "..."
	},
	os: {
		name: "...",
		version: "..."
	},
	device: {
		model: "...",
		type: "...",
		vendor: "..."
	},
	cpu: {
		architecture: "..."
	}
}

For more information, see the ua-parser-js module.