Home

# Class goog.storage.RichStorage.Wrapper

Wraps a value so metadata can be associated with it. You probably want to use goog.storage.RichStorage.Wrapper.wrapIfNecessary to avoid multiple embeddings.

Static Method Summary
| `unwrap(!Object wrapper) ⇒ <Any Type>` Unwraps a value, any metadata is discarded (not returned). You might want to use goog.storage.RichStorage.Wrapper.unwrapIfPossible to handle cases where the wrapper is missing.
| `unwrapIfPossible((Object|undefined) wrapper) ⇒ <Any Type>` Convenience method for unwrapping a value. Returns undefined if the wrapper is missing.
| `wrapIfNecessary(<Any Type> value) ⇒ (goog.storage.RichStorage.Wrapper|undefined)` Convenience method for wrapping a value so metadata can be associated with it. No-op if the value is already wrapped or is undefined.