import * as express from 'express' ; export const getUserAgent = ( req ) => { let userAgent = ( req . headers [ 'user-agent' ] as string ) || '' ; if ( req . headers [ 'x-ucbrowser-ua' ] ) { userAgent = req . headers [ 'x-ucbrowser-ua' ] as string ; } return userAgent ; } ;