HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/shop.komma.nl/node_modules/@vue/cli-ui/apollo-server/util/logger.js
const { chalk } = require('@vue/cli-shared-utils')

exports.log = (...args) => {
  if (!process.env.VUE_APP_CLI_UI_DEBUG) return
  const date = new Date()
  const timestamp = `${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}.${date.getSeconds().toString().padStart(2, '0')}`
  const first = args.shift()
  console.log(`${chalk.blue('UI')} ${chalk.dim(timestamp)}`, chalk.bold(first), ...args)
}

const simpleTypes = [
  'string',
  'number',
  'boolean'
]

exports.dumpObject = (obj) => {
  if (!process.env.VUE_APP_CLI_UI_DEBUG) return
  const result = {}
  Object.keys(obj).forEach(key => {
    const value = obj[key]
    const type = typeof value
    if (simpleTypes.includes(type)) {
      result[key] = value
    } else {
      result[key] = type
    }
  })
  return result.toString()
}