Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/modules / ___dist / oneRequest / deps / fromRequestToHash.ddd
Size: Mime:
// import { isUndefined } from 'exotic'
// import { version } from '../../../package.json'

// function fromRequestToLog(req) {
//   // require('fliplog').verbose(1).data(req).echo()
//   Object.keys(req).forEach(key => {
//     if (['client', 'parser', 'httpMessage', 'idlePrev', 'connecting', 'socket', 'connection', 'server', 'res', 'req', 'writableState', 'idleNext', 'readableState', '_events', 'writableState', 'idlePrev', 'null'].includes(key)) {
//       return
//     }
//     let asString = stringify(req[key])
//     let asObj = asString
//     try {
//       asObj = JSON.parse(asString)
//     } catch (exception) {
//       asObj = asString
//     }
//     require('fliplog').bold(key).data(asObj).echo()
//   })
// }

// function pickBest() {
// function sorter(a, b) {
//   if (a !== b) {
//     if (a > b || isUndefined(a)) {
//       return 1
//     }
//     if (a < b || isUndefined(b)) {
//       return -1
//     }
//   }
//   return a - b
// }
// const urls = [
//   req.url ? req.url._raw || req.url : undefined,
//   originalUrl,
//   req._parsedOriginalUrl ? req._parsedOriginalUrl.href || req._parsedOriginalUrl : undefined,
//   req._parsedUrl ? req._parsedUrl.href || req._parsedUrl : undefined,
//   // req.referer
// ]
//   .filter(url => url)
//   .sort(sorter)
// console.log({ urls, interestedin, req })
// }