{"action":"created","issue":{"url":"https://api.github.com/repos/jstat/jstat/issues/192","repository_url":"https://api.github.com/repos/jstat/jstat","labels_url":"https://api.github.com/repos/jstat/jstat/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/jstat/jstat/issues/192/comments","events_url":"https://api.github.com/repos/jstat/jstat/issues/192/events","html_url":"https://github.com/jstat/jstat/issues/192","id":155080091,"number":192,"title":"Can't import jStat in Meteor","user":{"login":"eric-burel","id":7983005,"avatar_url":"https://avatars.githubusercontent.com/u/7983005?v=3","gravatar_id":"","url":"https://api.github.com/users/eric-burel","html_url":"https://github.com/eric-burel","followers_url":"https://api.github.com/users/eric-burel/followers","following_url":"https://api.github.com/users/eric-burel/following{/other_user}","gists_url":"https://api.github.com/users/eric-burel/gists{/gist_id}","starred_url":"https://api.github.com/users/eric-burel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eric-burel/subscriptions","organizations_url":"https://api.github.com/users/eric-burel/orgs","repos_url":"https://api.github.com/users/eric-burel/repos","events_url":"https://api.github.com/users/eric-burel/events{/privacy}","received_events_url":"https://api.github.com/users/eric-burel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-16T17:37:50Z","updated_at":"2016-05-16T18:24:51Z","closed_at":null,"body":"Hi,\r\n\r\nI am using Meteor, and I am not able to import jStat correctly. It either does work on server or on client, but never on both. I understood that it is because jStat export policies being different on client and on server, and therefore require a different `import` call for each case.\r\n\r\nHowever, I'd like to build a class that both work on a Node.js server and on the client, as it is very low level (confidence interval computation) and will be needed on both.\r\n\r\nHere is a link to the corresponding [Stack Overflow question](http://stackoverflow.com/questions/37187233/npm-import-with-meteor-conflict-between-test-and-production?noredirect=1#comment61910254_37187233) with the code and more details.\r\n\r\nDo you have an idea how I can import jStat correctly in my file ? Of course `if (Meteor.isServer){...}` does not work, as the import must be at the beggining of JavaScript file and therefore can not be included in a branch.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jstat/jstat/issues/comments/219504426","html_url":"https://github.com/jstat/jstat/issues/192#issuecomment-219504426","issue_url":"https://api.github.com/repos/jstat/jstat/issues/192","id":219504426,"user":{"login":"jamescgibson","id":1410571,"avatar_url":"https://avatars.githubusercontent.com/u/1410571?v=3","gravatar_id":"","url":"https://api.github.com/users/jamescgibson","html_url":"https://github.com/jamescgibson","followers_url":"https://api.github.com/users/jamescgibson/followers","following_url":"https://api.github.com/users/jamescgibson/following{/other_user}","gists_url":"https://api.github.com/users/jamescgibson/gists{/gist_id}","starred_url":"https://api.github.com/users/jamescgibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamescgibson/subscriptions","organizations_url":"https://api.github.com/users/jamescgibson/orgs","repos_url":"https://api.github.com/users/jamescgibson/repos","events_url":"https://api.github.com/users/jamescgibson/events{/privacy}","received_events_url":"https://api.github.com/users/jamescgibson/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T18:24:51Z","updated_at":"2016-05-16T18:24:51Z","body":"Hi Eric,\r\n\r\nI'm not hugely familiar with JS loading intricacies - but does doing `import jStat from jStat` and then calling something to the effect of `jStat = jStat.jStat` work, or do anything differently?\r\n"}}