{"action":"closed","issue":{"url":"https://api.github.com/repos/arqex/freezer/issues/10","labels_url":"https://api.github.com/repos/arqex/freezer/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/arqex/freezer/issues/10/comments","events_url":"https://api.github.com/repos/arqex/freezer/issues/10/events","html_url":"https://github.com/arqex/freezer/issues/10","id":60648624,"number":10,"title":"Generic on.update functionality","user":{"login":"mehdi-cit","id":2162107,"avatar_url":"https://avatars.githubusercontent.com/u/2162107?v=3","gravatar_id":"","url":"https://api.github.com/users/mehdi-cit","html_url":"https://github.com/mehdi-cit","followers_url":"https://api.github.com/users/mehdi-cit/followers","following_url":"https://api.github.com/users/mehdi-cit/following{/other_user}","gists_url":"https://api.github.com/users/mehdi-cit/gists{/gist_id}","starred_url":"https://api.github.com/users/mehdi-cit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mehdi-cit/subscriptions","organizations_url":"https://api.github.com/users/mehdi-cit/orgs","repos_url":"https://api.github.com/users/mehdi-cit/repos","events_url":"https://api.github.com/users/mehdi-cit/events{/privacy}","received_events_url":"https://api.github.com/users/mehdi-cit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-11T12:05:57Z","updated_at":"2015-03-15T13:32:11Z","closed_at":"2015-03-15T13:32:11Z","body":"Hello and thank you for what seems like a very nice and lean library :+1: \r\n\r\nI wonder whether it'd be possible and even desirable to have a more generic -more generic in my mind- on.update functionality as described below:\r\n```\r\n// Browserify/Node style of loading\r\nvar Freezer = require('freezer');\r\n\r\n// Let's create a freezer store\r\nvar store = new Freezer({\r\n    a: {x: 1, y: 2, z: [0, 1, 2] },\r\n    b: 'Hola'\r\n});\r\n// Listen to changes in the store\r\nstore.on('update', function(changeList){\r\n    console.log( 'I may only be triggered after data.endTransaction() is invoked' );\r\n    //changeList = [\r\n     // {path:'a.z', newData:['a', 0, 1, 2, 3, 'z'], oldData:[0,1,2]} ,\r\n     //{path:'b', newData:'Hello', oldData:'Hola'} \r\n   //];\r\n});\r\n\r\nvar data = store.get();\r\ndata.begingTransaction();\r\ndata.a.z.push(3).unshift( 'a' );\r\ndata.b = 'Hello';\r\ndata.a.z.push('z');\r\ndata.endTransaction();\r\n```\r\n\r\nThanks again."}}