Determining the Storage Key
Understand which storage key would be feasible according to the requirements of the entities.
We'll cover the following...
We'll cover the following...
Creating a function to determine the storage key
We need to determine the storage key according to each entity, so let’s create a function for that:
That’s a great start, but both url and urlRoot can be defined as functions. Therefore, let’s use Underscore’s result function to return the value or function result as the case may be:
Great! Since we create a ...