{"action":"created","issue":{"url":"https://api.github.com/repos/rsms/js-lru/issues/24","repository_url":"https://api.github.com/repos/rsms/js-lru","labels_url":"https://api.github.com/repos/rsms/js-lru/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/rsms/js-lru/issues/24/comments","events_url":"https://api.github.com/repos/rsms/js-lru/issues/24/events","html_url":"https://github.com/rsms/js-lru/pull/24","id":212558896,"number":24,"title":"Explain how to import the lru_map package","user":{"login":"roryokane","id":79168,"avatar_url":"https://avatars3.githubusercontent.com/u/79168?v=3","gravatar_id":"","url":"https://api.github.com/users/roryokane","html_url":"https://github.com/roryokane","followers_url":"https://api.github.com/users/roryokane/followers","following_url":"https://api.github.com/users/roryokane/following{/other_user}","gists_url":"https://api.github.com/users/roryokane/gists{/gist_id}","starred_url":"https://api.github.com/users/roryokane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roryokane/subscriptions","organizations_url":"https://api.github.com/users/roryokane/orgs","repos_url":"https://api.github.com/users/roryokane/repos","events_url":"https://api.github.com/users/roryokane/events{/privacy}","received_events_url":"https://api.github.com/users/roryokane/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-07T21:07:23Z","updated_at":"2017-03-07T22:27:14Z","closed_at":"2017-03-07T22:27:14Z","pull_request":{"url":"https://api.github.com/repos/rsms/js-lru/pulls/24","html_url":"https://github.com/rsms/js-lru/pull/24","diff_url":"https://github.com/rsms/js-lru/pull/24.diff","patch_url":"https://github.com/rsms/js-lru/pull/24.patch"},"body":"And suggest adding `--save` to the `npm install`, because installing packages per-project rather than globally is a best practice, and there is already a simpler installation method listed for people who wouldn’t know that they need to run `npm init`.\r\n\r\nIt is necessary to explain how to import LRUMap because I at first tried to import it with `import LRUMap from 'lru_map';`. My build then gave only the cryptic error message “`_lru_map2.default` is not a constructor”. It took inspecting the LRUMap source code to figure out that I had to take the `LRUMap` property of what was exported instead of using the exported object directly."},"comment":{"url":"https://api.github.com/repos/rsms/js-lru/issues/comments/284880808","html_url":"https://github.com/rsms/js-lru/pull/24#issuecomment-284880808","issue_url":"https://api.github.com/repos/rsms/js-lru/issues/24","id":284880808,"user":{"login":"rsms","id":47046,"avatar_url":"https://avatars2.githubusercontent.com/u/47046?v=3","gravatar_id":"","url":"https://api.github.com/users/rsms","html_url":"https://github.com/rsms","followers_url":"https://api.github.com/users/rsms/followers","following_url":"https://api.github.com/users/rsms/following{/other_user}","gists_url":"https://api.github.com/users/rsms/gists{/gist_id}","starred_url":"https://api.github.com/users/rsms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsms/subscriptions","organizations_url":"https://api.github.com/users/rsms/orgs","repos_url":"https://api.github.com/users/rsms/repos","events_url":"https://api.github.com/users/rsms/events{/privacy}","received_events_url":"https://api.github.com/users/rsms/received_events","type":"User","site_admin":false},"created_at":"2017-03-07T22:27:14Z","updated_at":"2017-03-07T22:27:14Z","body":"1. You might not want to --save and since it's destructive (modifies other files), it should be added by the user if wanted.\r\n2. How things are imported in CommonJS or ES6 should be known by the user. If we explain how to import a library, we would also have to teach people JavaScript, which is not the purpose of this project.\r\n\r\nThanks though :)"}}
{"actor":{"display_login":"rsms"}}