pinafore/routes/_utils/marks.js

13 lines
324 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'
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
}