semaphore/routes/_utils/marks.js

15 lines
356 B
JavaScript
Raw Normal View History

2018-01-17 08:59:15 +00:00
import { mark as markyMark, stop as markyStop } from 'marky'
import noop from 'lodash/noop'
2018-01-31 16:40:37 +00:00
const enableMarks = process.browser &&
(process.env.NODE_ENV !== 'production' ||
new URLSearchParams(location.search).get('marks') === 'true')
2018-01-17 08:59:15 +00:00
const mark = enableMarks ? markyMark : noop
const stop = enableMarks ? markyStop : noop
export {
mark,
stop
2018-02-09 06:29:29 +00:00
}