normalize (modelName, payload) Object
normalize
converts a json payload into the normalized form that push expects.
Example
socket.on('message', function(message) { var modelName = message.model; var data = message.data; store.push(store.normalize(modelName, data)); });
Parameters:
-
modelName
String
- The name of the model type for this payload
-
payload
Object
Returns:
-
Object
- The normalized payload
Please login to continue.