ucsc-xena-client
Version:
UCSC Xena Client. Functional genomics visualizations.
26 lines (21 loc) • 554 B
JavaScript
var _ = require('./underscore_ext');
function getNotifications() {
var nj = localStorage.xenaNotifications || '{}',
notes;
try {
notes = JSON.parse(nj);
} catch (err) {}
return _.isObject(notes) ? notes : {};
}
function setNotifications(notes) {
localStorage.xenaNotifications = JSON.stringify(notes);
}
function disableNotification(notes, note) {
return _.assoc(notes, note, true);
}
module.exports = {
getNotifications: getNotifications,
disableNotification: disableNotification,
setNotifications: setNotifications
};
;