A minimal API wrapper for localStorage