{"action":"created","issue":{"url":"https://api.github.com/repos/jussi-kalliokoski/trine/issues/56","labels_url":"https://api.github.com/repos/jussi-kalliokoski/trine/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/jussi-kalliokoski/trine/issues/56/comments","events_url":"https://api.github.com/repos/jussi-kalliokoski/trine/issues/56/events","html_url":"https://github.com/jussi-kalliokoski/trine/issues/56","id":98838765,"number":56,"title":"Consider exporting functions as `default`","user":{"login":"tomekwi","id":4624660,"avatar_url":"https://avatars.githubusercontent.com/u/4624660?v=3","gravatar_id":"","url":"https://api.github.com/users/tomekwi","html_url":"https://github.com/tomekwi","followers_url":"https://api.github.com/users/tomekwi/followers","following_url":"https://api.github.com/users/tomekwi/following{/other_user}","gists_url":"https://api.github.com/users/tomekwi/gists{/gist_id}","starred_url":"https://api.github.com/users/tomekwi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomekwi/subscriptions","organizations_url":"https://api.github.com/users/tomekwi/orgs","repos_url":"https://api.github.com/users/tomekwi/repos","events_url":"https://api.github.com/users/tomekwi/events{/privacy}","received_events_url":"https://api.github.com/users/tomekwi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jussi-kalliokoski/trine/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-03T21:07:17Z","updated_at":"2015-08-04T07:10:28Z","closed_at":null,"body":"My two cents to #46:\r\n\r\nWhen I started using *trine* it was a surprising discovery that trying to `import map from 'trine/iterable/map'` failed. It cost me some time to find out that I should have `import`ed `{map}` instead.\r\n\r\nSince I heard that *[“Default exports are favored”](http://www.2ality.com/2014/09/es6-modules-final.html#default_exports_are_favored)* I’ve always tried to only `export default` out of my modules, and I’ve seen others do the same. I’ve grown to expect that of other ES 2015+ libraries as well.\r\n\r\nIs there any reason why you use named exports instead of `export`ing `default`? That would make for [even simpler syntax](https://github.com/jussi-kalliokoski/trine/pull/46#issuecomment-125577935):\r\n\r\n```js\r\nimport dropTail from \"trine/iterable/droptail\";\r\nimport dropHead from \"trine/iterable/dropHead\";\r\nimport intersection from \"trine/iterable/intersection\";\r\nimport sortAlphabetically from \"trine/iterable/sortAlphabetically\";\r\nimport uniq from \"trine/iterable/uniq\";\r\nimport difference from \"trine/iterable/difference\";\r\nimport enumerate from \"trine/iterable/enumerate\";\r\nimport zip from \"trine/iterable/zip\";\r\nimport toFunction from \"trine/value/toFunction\";\r\nimport partial from \"trine/function/partial\";\r\n```"},"comment":{"url":"https://api.github.com/repos/jussi-kalliokoski/trine/issues/comments/127504296","html_url":"https://github.com/jussi-kalliokoski/trine/issues/56#issuecomment-127504296","issue_url":"https://api.github.com/repos/jussi-kalliokoski/trine/issues/56","id":127504296,"user":{"login":"tomekwi","id":4624660,"avatar_url":"https://avatars.githubusercontent.com/u/4624660?v=3","gravatar_id":"","url":"https://api.github.com/users/tomekwi","html_url":"https://github.com/tomekwi","followers_url":"https://api.github.com/users/tomekwi/followers","following_url":"https://api.github.com/users/tomekwi/following{/other_user}","gists_url":"https://api.github.com/users/tomekwi/gists{/gist_id}","starred_url":"https://api.github.com/users/tomekwi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomekwi/subscriptions","organizations_url":"https://api.github.com/users/tomekwi/orgs","repos_url":"https://api.github.com/users/tomekwi/repos","events_url":"https://api.github.com/users/tomekwi/events{/privacy}","received_events_url":"https://api.github.com/users/tomekwi/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T07:10:28Z","updated_at":"2015-08-04T07:10:28Z","body":">  This allows code editors to know the name of the export\r\n\r\nSincerely, I don’t think basing a design decision on features of a code editor is the way to go.\r\n\r\nWhen you `import map from 'trine/iterable/map'`, it’s just as easy to determine the name of the export – it’s `default`. A good editor should figure that out.\r\n\r\n>  one could imagine having a keyboard shortcut for importing a new thing and just type in the module path (or part of it) and the editor can handle the rest, including naming. :)\r\n\r\nOn Sublime I used to have a snippet for that: https://github.com/tomekwi/sublime-snippets/blob/ae89045999dff04977174fc27a694df17081364c/JS/import.sublime-snippet – no need for named exports there.\r\n\r\n> Also some of the modules have multiple exports:\r\n\r\nNo problem:\r\n\r\n```js\r\nimport { default as partial, _, ___ } from \"trine/function/partial\";\r\n```"}}