pinafore/routes/_utils/marks.js

14 lines
355 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
}