code: function save(storage, name, value) {
          var key = '$BD$' + name;
          if (value === null) value = '';
          storage[key] = value;
        }
docs: Note: LocalStorage converts the value to string We are using empty string as a marker for null/undefined values.