2020-06-13 02:53:16 -07:00
|
|
|
// This somewhat mysterious module will load a json string
|
|
|
|
// and then extract only the 'notifications' part. This is
|
|
|
|
// meant to be used to load the partial i18n we need for
|
|
|
|
// the service worker.
|
|
|
|
module.exports = function (source) {
|
2020-06-13 02:47:34 -07:00
|
|
|
var object = JSON.parse(source)
|
|
|
|
var smol = {
|
|
|
|
notifications: object.notifications || {}
|
|
|
|
}
|
|
|
|
|
|
|
|
return JSON.stringify(smol)
|
|
|
|
}
|