Use _.result to allow defining localStorage as a function