pinafore/routes/_utils/marks.js
2018-01-17 00:59:15 -08:00

13 lines
324 B
JavaScript

import { mark as markyMark, stop as markyStop } from 'marky'
import noop from 'lodash/noop'
const enableMarks = typeof window !== 'undefined' &&
new URLSearchParams(location.search).get('marks') === 'true'
const mark = enableMarks ? markyMark : noop
const stop = enableMarks ? markyStop : noop
export {
mark,
stop
}