Sometimes satisfies is not a function in this code:
// Get the user agent string from the headers
uaString = headers['user-agent'];
// Start parsing the string
is = useragent.is(uaString);
agent = useragent.parse(uaString);
if (typeof agent.satisfies != 'function') {
console.log('Satisfies is not a function?', headers, uaString, is, agent);
}
The input uaString would be a regular useragent like:
Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0
The agent object IS an Agent instance, though, and looks like this:
Sometimes
satisfies
is not a function in this code:The input uaString would be a regular useragent like:
The
agent
object IS anAgent
instance, though, and looks like this: