code for saving, getting and erasing notifications history in the local storage