{"action":"created","issue":{"url":"https://api.github.com/repos/crossfilter/universe/issues/20","repository_url":"https://api.github.com/repos/crossfilter/universe","labels_url":"https://api.github.com/repos/crossfilter/universe/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/crossfilter/universe/issues/20/comments","events_url":"https://api.github.com/repos/crossfilter/universe/issues/20/events","html_url":"https://github.com/crossfilter/universe/issues/20","id":161854662,"number":20,"title":"Bugs in filter method","user":{"login":"Hypercubed","id":509946,"avatar_url":"https://avatars.githubusercontent.com/u/509946?v=3","gravatar_id":"","url":"https://api.github.com/users/Hypercubed","html_url":"https://github.com/Hypercubed","followers_url":"https://api.github.com/users/Hypercubed/followers","following_url":"https://api.github.com/users/Hypercubed/following{/other_user}","gists_url":"https://api.github.com/users/Hypercubed/gists{/gist_id}","starred_url":"https://api.github.com/users/Hypercubed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hypercubed/subscriptions","organizations_url":"https://api.github.com/users/Hypercubed/orgs","repos_url":"https://api.github.com/users/Hypercubed/repos","events_url":"https://api.github.com/users/Hypercubed/events{/privacy}","received_events_url":"https://api.github.com/users/Hypercubed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-23T07:10:13Z","updated_at":"2016-06-26T11:45:16Z","closed_at":null,"body":"I haven't had the time to isolate this one into a test but if I create a filter using a function:\r\n\r\n```\r\nconst fn => () { /* some function /* }\r\nuniverse.filter('search', fn)\r\n```\r\n\r\nThen later try to add another filter I get the error: `f is not a function at filterIndexFunction`.\r\n\r\nI have determined this is because the filter function gets converted to a string here:  https://github.com/crossfilter/universe/blob/master/src/filters.js#L38\r\n\r\nMy suggested solution is:\r\n\r\n```\r\n      var newFilters = _.clone(service.filters, true)\r\n      _.map(newFilters, function(fil, i) {\r\n        if (fil.type === 'function') {\r\n          fil.function = service.filters[i].function\r\n          fil.value = service.filters[i].value\r\n        }\r\n      })\r\n```"},"comment":{"url":"https://api.github.com/repos/crossfilter/universe/issues/comments/228597268","html_url":"https://github.com/crossfilter/universe/issues/20#issuecomment-228597268","issue_url":"https://api.github.com/repos/crossfilter/universe/issues/20","id":228597268,"user":{"login":"Hypercubed","id":509946,"avatar_url":"https://avatars.githubusercontent.com/u/509946?v=3","gravatar_id":"","url":"https://api.github.com/users/Hypercubed","html_url":"https://github.com/Hypercubed","followers_url":"https://api.github.com/users/Hypercubed/followers","following_url":"https://api.github.com/users/Hypercubed/following{/other_user}","gists_url":"https://api.github.com/users/Hypercubed/gists{/gist_id}","starred_url":"https://api.github.com/users/Hypercubed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hypercubed/subscriptions","organizations_url":"https://api.github.com/users/Hypercubed/orgs","repos_url":"https://api.github.com/users/Hypercubed/repos","events_url":"https://api.github.com/users/Hypercubed/events{/privacy}","received_events_url":"https://api.github.com/users/Hypercubed/received_events","type":"User","site_admin":false},"created_at":"2016-06-26T11:45:16Z","updated_at":"2016-06-26T11:45:16Z","body":"I combine these two bug reports into one issue because I think the solution might be coupled."}}
{"actor":{"display_login":"Hypercubed"}}