localStorage abstraction