{"size": 479, "ext": "js", "max_stars_repo_path": "src/common/filters/index.js", "max_stars_repo_name": "xanke/disney-admin", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/common/filters/index.js", "max_issues_repo_name": "xanke/disney-admin", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/common/filters/index.js", "max_forks_repo_name": "xanke/disney-admin", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.9583333333, "max_line_length": 52, "alphanum_fraction": 0.5949895616}
import moment from 'moment'
export function time(value) {
  const val = moment(value, 'x').format('H:mm:ss')
  return val
}

export function timeFormat(value, src, format) {
  let val = moment(value, src).format(format)
  if (format === 'd') {
    const week = ['日', '一', '二', '三', '四', '五', '六']
    val = week[val]
  }
  return val
}

export function fieldName(value) {
  const keys = {
    flowAvg: '平均客流',
    flowMax: '最高客流',
    ticketNum: '售票量'
  }
  return keys[value]
}
