Save what has changed now, rather than with the next change, and resolve once every change made so far is saved: before the game is paused or closed, for example. A write that fails is logged, and the promise still resolves.
The getItem() method of the Storage interface, when passed a key name, will return that key's value, or null if the key does not exist, in the given Storage object.
The removeItem() method of the Storage interface, when passed a key name, will remove that key from the given Storage object if it exists. The Storage interface of the Web Storage API provides access to a particular domain's session or local storage.
The setItem() method of the Storage interface, when passed a key name and value, will add that key to the given Storage object, or update that key's value if it already exists.
A storage for save.setStorage() that keeps the items in memory and saves them to a platform's cloud save, made by save.createCloudStorage().