)]}'
{"horizon/static/framework/util/array/array.extensions.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"a12afdad0815eca8f68a85ed25952864d26911e6","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    return service;"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    function difference(currentList, otherList, key) {"},{"line_number":41,"context_line":"      return currentList.filter(filter);"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"      function filter(elem) {"}],"source_content_type":"text/javascript","patch_set":5,"id":"7a5de9d1_2637a4e4","line":40,"updated":"2016-01-29 04:35:56.000000000","message":"A quick description on this function would be very helpful. The name is good, but without it, I had to read the code / check the test code to really know the intent.","commit_id":"21f837267879b795516a2a760d2e6d7ec3e8a495"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"c7167a632270b5ba766c7d7de88ff9dc258a699f","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    return service;"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    function difference(currentList, otherList, key) {"},{"line_number":41,"context_line":"      return currentList.filter(filter);"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"      function filter(elem) {"}],"source_content_type":"text/javascript","patch_set":5,"id":"7a5de9d1_fdd48f20","line":40,"in_reply_to":"7a5de9d1_2637a4e4","updated":"2016-01-29 23:42:14.000000000","message":"Done","commit_id":"21f837267879b795516a2a760d2e6d7ec3e8a495"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"7d38e3dcdd409d1c9f8a34588e43a4ef20f43f50","unresolved":false,"context_lines":[{"line_number":42,"context_line":"     * an array that conains only elements of the first array which are"},{"line_number":43,"context_line":"     * not present in the second array."},{"line_number":44,"context_line":"     * Equality is determined by comparing the given key."},{"line_number":45,"context_line":"     *"},{"line_number":46,"context_line":"     * @param {array} currentList the list to remove elements from"},{"line_number":47,"context_line":"     * @param {array} otherList the other list"},{"line_number":48,"context_line":"     * @param {object} key the property used to compare"}],"source_content_type":"text/javascript","patch_set":6,"id":"7a5de9d1_bd6a97eb","line":45,"updated":"2016-02-03 04:49:05.000000000","message":"Since this works on array of objects (vs array of Strings) that might be important to call out or make key optional.","commit_id":"933bc945265412c6894353bc006615ff4308de15"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"5b6efd208c094dbfbb94ae13c9b34b7457b0103c","unresolved":false,"context_lines":[{"line_number":42,"context_line":"     * an array that conains only elements of the first array which are"},{"line_number":43,"context_line":"     * not present in the second array."},{"line_number":44,"context_line":"     * Equality is determined by comparing the given key."},{"line_number":45,"context_line":"     *"},{"line_number":46,"context_line":"     * @param {array} currentList the list to remove elements from"},{"line_number":47,"context_line":"     * @param {array} otherList the other list"},{"line_number":48,"context_line":"     * @param {object} key the property used to compare"}],"source_content_type":"text/javascript","patch_set":6,"id":"5a5ae5dd_59351c44","line":45,"in_reply_to":"7a5de9d1_bd6a97eb","updated":"2016-02-03 22:18:46.000000000","message":"Done","commit_id":"933bc945265412c6894353bc006615ff4308de15"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"ce4613dbed725bd0131737ad52b3e6429f664245","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"3a57f1b5_5c1d3365","updated":"2016-02-09 23:26:01.000000000","message":"I wonder if this is better served as a javascript extension vs an angular one.","commit_id":"3ca6988fcb725c144d2bb4c3d4054ef4005571ab"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"ce4613dbed725bd0131737ad52b3e6429f664245","unresolved":false,"context_lines":[{"line_number":47,"context_line":"     *"},{"line_number":48,"context_line":"     * @param {array} currentList the list of objects to remove elements from"},{"line_number":49,"context_line":"     * @param {array} otherList the other list of objects"},{"line_number":50,"context_line":"     * @param {object} key the property used to compare"},{"line_number":51,"context_line":"     *"},{"line_number":52,"context_line":"     */"},{"line_number":53,"context_line":"    function difference(currentList, otherList, key) {"}],"source_content_type":"text/javascript","patch_set":9,"id":"3a57f1b5_dcf28306","line":50,"updated":"2016-02-09 23:26:01.000000000","message":"nit: \"key the property we are comparing\" sounds a bit better","commit_id":"3ca6988fcb725c144d2bb4c3d4054ef4005571ab"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"ce4613dbed725bd0131737ad52b3e6429f664245","unresolved":false,"context_lines":[{"line_number":51,"context_line":"     *"},{"line_number":52,"context_line":"     */"},{"line_number":53,"context_line":"    function difference(currentList, otherList, key) {"},{"line_number":54,"context_line":"      if (angular.isArray(currentList) \u0026\u0026 angular.isArray(otherList)) {"},{"line_number":55,"context_line":"        return currentList.filter(filter);"},{"line_number":56,"context_line":"      } else {"},{"line_number":57,"context_line":"        return currentList;"}],"source_content_type":"text/javascript","patch_set":9,"id":"3a57f1b5_1c2c9b49","line":54,"updated":"2016-02-09 23:26:01.000000000","message":"nit: can use JS shorthand if notation.","commit_id":"3ca6988fcb725c144d2bb4c3d4054ef4005571ab"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"ce4613dbed725bd0131737ad52b3e6429f664245","unresolved":false,"context_lines":[{"line_number":54,"context_line":"      if (angular.isArray(currentList) \u0026\u0026 angular.isArray(otherList)) {"},{"line_number":55,"context_line":"        return currentList.filter(filter);"},{"line_number":56,"context_line":"      } else {"},{"line_number":57,"context_line":"        return currentList;"},{"line_number":58,"context_line":"      }"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"      function filter(elem) {"}],"source_content_type":"text/javascript","patch_set":9,"id":"3a57f1b5_fc13bf0b","line":57,"updated":"2016-02-09 23:26:01.000000000","message":"nit: If I pass in \u0027A\u0027 and [1,2,3], I get \u0027A\u0027 back. That is a bit strange, but within the realm of reasonable. Curious to know what others think.","commit_id":"3ca6988fcb725c144d2bb4c3d4054ef4005571ab"}],"horizon/static/framework/util/array/array.extensions.spec.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"a12afdad0815eca8f68a85ed25952864d26911e6","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        expect(service.difference).toBeDefined();"},{"line_number":29,"context_line":"      });"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"      it(\u0027should return the difference with the provided array based ong property\u0027, function() {"},{"line_number":32,"context_line":"        var array \u003d [{id: 1, name: \u0027A\u0027}, {id: 2, name: \u0027B\u0027}, {id: 3, name: \u0027C\u0027}];"},{"line_number":33,"context_line":"        var expected \u003d [{id: 2, name: \u0027B\u0027}, {id: 3, name: \u0027C\u0027}];"},{"line_number":34,"context_line":""}],"source_content_type":"text/javascript","patch_set":5,"id":"7a5de9d1_e630acea","line":31,"updated":"2016-01-29 04:35:56.000000000","message":"nit ong --\u003e on","commit_id":"21f837267879b795516a2a760d2e6d7ec3e8a495"},{"author":{"_account_id":17013,"name":"Rajat Vig","email":"rajatv@thoughtworks.com","username":"rajatvig"},"change_message_id":"c7167a632270b5ba766c7d7de88ff9dc258a699f","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        expect(service.difference).toBeDefined();"},{"line_number":29,"context_line":"      });"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"      it(\u0027should return the difference with the provided array based ong property\u0027, function() {"},{"line_number":32,"context_line":"        var array \u003d [{id: 1, name: \u0027A\u0027}, {id: 2, name: \u0027B\u0027}, {id: 3, name: \u0027C\u0027}];"},{"line_number":33,"context_line":"        var expected \u003d [{id: 2, name: \u0027B\u0027}, {id: 3, name: \u0027C\u0027}];"},{"line_number":34,"context_line":""}],"source_content_type":"text/javascript","patch_set":5,"id":"7a5de9d1_1ddacb4c","line":31,"in_reply_to":"7a5de9d1_e630acea","updated":"2016-01-29 23:42:14.000000000","message":"Done","commit_id":"21f837267879b795516a2a760d2e6d7ec3e8a495"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"ce4613dbed725bd0131737ad52b3e6429f664245","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"      it(\u0027should work if given list is not an array\u0027, function() {"},{"line_number":45,"context_line":"        expect(service.difference(\"ABC\", \"AB\", \"something\")).toEqual(\"ABC\");"},{"line_number":46,"context_line":"      });"},{"line_number":47,"context_line":"    });"},{"line_number":48,"context_line":"  });"},{"line_number":49,"context_line":""}],"source_content_type":"text/javascript","patch_set":9,"id":"3a57f1b5_3cd87753","line":46,"updated":"2016-02-09 23:26:01.000000000","message":"To be more thorough, can include other strange cases like null, undefine, numerics, etc...","commit_id":"3ca6988fcb725c144d2bb4c3d4054ef4005571ab"}]}
