pinafore/src/routes/_store/safeParse.js
Nolan Lawson a35f5ee2d9
feat: implement wellness settings (#1256)
* implement wellness settings

fixes #1192

Adds
- grayscale mode (as well as separate grayscale/dark grayscale
themes)
- disable follower/boost/fav counts (follower counts capped at 10)
- disable unread notification count (red dot)

* fix lint

* fix crawler
2019-06-01 13:07:31 -07:00

4 lines
116 B
JavaScript

export function safeParse (str) {
return !str ? undefined : (str === 'undefined' ? undefined : JSON.parse(str))
}