debian-mirror-gitlab/app/assets/javascripts/logs/stores/getters.js
2020-04-08 14:13:33 +05:30

9 lines
347 B
JavaScript

import { formatDate } from '../utils';
const mapTrace = ({ timestamp = null, message = '' }) =>
[timestamp ? formatDate(timestamp) : '', message].join(' | ');
export const trace = state => state.logs.lines.map(mapTrace).join('\n');
// prevent babel-plugin-rewire from generating an invalid default during karma tests
export default () => {};