@mrhenry/polyfill-useragent-normaliser
v1.0.0
Published
The user-agent normalisation logic behind @mrhenry/polyfill-library
Readme
User Agent normaliser
This is the JavaScript implementation of the User-Agent normalisation used within the polyfill-library.
Usage
For a request which was the user-agent Chrome 71.1:
Example
const UA = require('@mrhenry/polyfill-useragent-normaliser');
const useragent = new UA(request.headers['user-agent']);
console.log(useragent.isUnknown()); // false
console.log(useragent.satisfies("<50")); // false
console.log(useragent.satisfies(">50")); // true