UNPKG

synopsis-client

Version:

A client that connects to a synopsis-backend for simple data storage

18 lines (17 loc) 349 B
// stut out local storage for testing purposes if (typeof(localStorage) === 'undefined') { var data = {}; module.exports = { setItem: function(key, val) { data[key] = val; }, getItem: function(key) { return data[key]; }, clear: function() { data = {}; } }; } else { module.exports = localStorage; }