updates instances with the data from the response bodies of create, update and delete requests

triggers events on the Map type and instances when instances are created, destroyed or updated

Parameters

baseConnection{Object}:

can-connect connection object that is having the can/map behavior added on to it. Expects
the constructor behavior to already be added to this base connection. If the connect helper
is used to build the connection, the behaviors will automatically be ordered as required.

Returns

{Object}:

a can-connect connection containing the methods provided by can/map.

Use

The can/map behavior links a connection to a DefineMap and DefineList type.
The connection will create those types of instances from the data it receives. It also adds convenient methods and
observable values to the Map that offer connection functionality (e.g
instance.save) and the status of the instance (e.g
instance.isSaving).

To use the can/map behavior, first create a Map and List constructor function: