MCPcopy
hub / github.com/jeromegn/Backbone.localStorage / find

Method find

src/localstorage.js:97–99  ·  view source on GitHub ↗

Retrieve a model from local storage by model id * @param {Model} model - The Backbone Model to lookup * @returns {Model} The model from LocalStorage

(model)

Source from the content-addressed store, hash-verified

95 * @returns {Model} The model from LocalStorage
96 */
97 find(model) {
98 return this.serializer.deserialize(this._getItem(this._itemName(model.id)));
99 }
100
101 /** Return all models from LocalStorage
102 * @returns {Array} The array of models stored

Callers 3

createMethod · 0.95
updateMethod · 0.95
syncFunction · 0.80

Calls 2

_getItemMethod · 0.95
_itemNameMethod · 0.95

Tested by

no test coverage detected