pinafore/routes/_utils/marks.js

14 lines
355 B
JavaScript
Raw Normal View History

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