{"action":"created","issue":{"url":"https://api.github.com/repos/marijnh/tern/issues/472","labels_url":"https://api.github.com/repos/marijnh/tern/issues/472/labels{/name}","comments_url":"https://api.github.com/repos/marijnh/tern/issues/472/comments","events_url":"https://api.github.com/repos/marijnh/tern/issues/472/events","html_url":"https://github.com/marijnh/tern/issues/472","id":53450013,"number":472,"title":"functional condense() method","user":{"login":"tmcw","id":32314,"avatar_url":"https://avatars.githubusercontent.com/u/32314?v=3","gravatar_id":"","url":"https://api.github.com/users/tmcw","html_url":"https://github.com/tmcw","followers_url":"https://api.github.com/users/tmcw/followers","following_url":"https://api.github.com/users/tmcw/following{/other_user}","gists_url":"https://api.github.com/users/tmcw/gists{/gist_id}","starred_url":"https://api.github.com/users/tmcw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmcw/subscriptions","organizations_url":"https://api.github.com/users/tmcw/orgs","repos_url":"https://api.github.com/users/tmcw/repos","events_url":"https://api.github.com/users/tmcw/events{/privacy}","received_events_url":"https://api.github.com/users/tmcw/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-05T21:27:17Z","updated_at":"2015-01-20T11:16:16Z","closed_at":"2015-01-20T11:16:16Z","body":"Right now `condense()` relies on a server's state indirectly as a global. Could there instead be a method for a tern server to dump its current state and context would take that as an argument, so that it would be possible to implement something like `condense()` (like #470) without being within the tern package?"},"comment":{"url":"https://api.github.com/repos/marijnh/tern/issues/comments/70639012","html_url":"https://github.com/marijnh/tern/issues/472#issuecomment-70639012","issue_url":"https://api.github.com/repos/marijnh/tern/issues/472","id":70639012,"user":{"login":"marijnh","id":144427,"avatar_url":"https://avatars.githubusercontent.com/u/144427?v=3","gravatar_id":"","url":"https://api.github.com/users/marijnh","html_url":"https://github.com/marijnh","followers_url":"https://api.github.com/users/marijnh/followers","following_url":"https://api.github.com/users/marijnh/following{/other_user}","gists_url":"https://api.github.com/users/marijnh/gists{/gist_id}","starred_url":"https://api.github.com/users/marijnh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marijnh/subscriptions","organizations_url":"https://api.github.com/users/marijnh/orgs","repos_url":"https://api.github.com/users/marijnh/repos","events_url":"https://api.github.com/users/marijnh/events{/privacy}","received_events_url":"https://api.github.com/users/marijnh/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T11:16:15Z","updated_at":"2015-01-20T11:16:15Z","body":"I think you are confusing the 'dynamic' variable `infer.cx()` with a global. You can run condense in the context of any server using `infer.withContext`. It would even be possible to create a plugin that defines a new query type to dump the server's current definitions for a given set of origins."}}