walmartlabs/lumbar-loader — pull request #16 by patrickkettner (2014-02-18 03:04:29+00:00)
Title: ignore "Invalid Arguments" error when IE tries to `setItem` with certain

characters

ie uses xml internally to store localStorage, and as a result certain characters
can't be saved, and the err gets thrown. since this is an edge case, the best
best thing to do is just ignore the error. An alternative would be to rety saving
the data after `escape`ing it, but that would require `unescape`ing it on the getItem
side. Quick benchmarking shows that that slows access time ~65$ for larger objects.