{"action":"created","comment":{"url":"https://api.github.com/repos/bitpay/bitcore-node/pulls/comments/25425114","id":25425114,"diff_hunk":"@@ -0,0 +1,58 @@\n+'use strict';\n+\n+\n+var bitcore = require('bitcore');\n+var Networks = bitcore.Networks;\n+var p2p = require('bitcore-p2p');\n+var Promise = require('bluebird');\n+var $ = bitcore.util.preconditions;\n+var _ = bitcore.deps._;\n+var EventEmitter = require('events').EventEmitter;\n+var util = require('util');\n+var EventBus = require('./eventbus');\n+var Peer = p2p.Peer;\n+var Messages = p2p.Messages;","path":"lib/networkmonitor.js","position":14,"original_position":14,"commit_id":"df04857bb494d8ec6887e49f77e6ddf3e6b01951","original_commit_id":"df04857bb494d8ec6887e49f77e6ddf3e6b01951","user":{"login":"yemel","id":279449,"avatar_url":"https://avatars.githubusercontent.com/u/279449?v=3","gravatar_id":"","url":"https://api.github.com/users/yemel","html_url":"https://github.com/yemel","followers_url":"https://api.github.com/users/yemel/followers","following_url":"https://api.github.com/users/yemel/following{/other_user}","gists_url":"https://api.github.com/users/yemel/gists{/gist_id}","starred_url":"https://api.github.com/users/yemel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yemel/subscriptions","organizations_url":"https://api.github.com/users/yemel/orgs","repos_url":"https://api.github.com/users/yemel/repos","events_url":"https://api.github.com/users/yemel/events{/privacy}","received_events_url":"https://api.github.com/users/yemel/received_events","type":"User","site_admin":false},"body":"Could you sort this list? A good practice is to separate it in 3 groups:\r\n\r\n1 - Third party libraries\r\n2 - Our external libraries (bitcore)\r\n3 - Project specific clases\r\n\r\nE.g:\r\n\r\n```\r\nvar util = require('util');\r\nvar Promise = require('bluebird');\r\nvar EventEmitter = require('events').EventEmitter;\r\n\r\nvar bitcore = require('bitcore');\r\nvar Networks = bitcore.Networks;\r\nvar $ = bitcore.util.preconditions;\r\nvar _ = bitcore.deps._;\r\nvar p2p = require('bitcore-p2p');\r\nvar Peer = p2p.Peer;\r\nvar Messages = p2p.Messages;\r\n\r\nvar EventBus = require('./eventbus');\r\n```","created_at":"2015-02-26T13:12:48Z","updated_at":"2015-02-26T13:12:48Z","html_url":"https://github.com/bitpay/bitcore-node/pull/18#discussion_r25425114","pull_request_url":"https://api.github.com/repos/bitpay/bitcore-node/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/bitpay/bitcore-node/pulls/comments/25425114"},"html":{"href":"https://github.com/bitpay/bitcore-node/pull/18#discussion_r25425114"},"pull_request":{"href":"https://api.github.com/repos/bitpay/bitcore-node/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/bitpay/bitcore-node/pulls/18","id":29942039,"html_url":"https://github.com/bitpay/bitcore-node/pull/18","diff_url":"https://github.com/bitpay/bitcore-node/pull/18.diff","patch_url":"https://github.com/bitpay/bitcore-node/pull/18.patch","issue_url":"https://api.github.com/repos/bitpay/bitcore-node/issues/18","number":18,"state":"open","locked":false,"title":"Add NetworkMonitor","user":{"login":"maraoz","id":287189,"avatar_url":"https://avatars.githubusercontent.com/u/287189?v=3","gravatar_id":"","url":"https://api.github.com/users/maraoz","html_url":"https://github.com/maraoz","followers_url":"https://api.github.com/users/maraoz/followers","following_url":"https://api.github.com/users/maraoz/following{/other_user}","gists_url":"https://api.github.com/users/maraoz/gists{/gist_id}","starred_url":"https://api.github.com/users/maraoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maraoz/subscriptions","organizations_url":"https://api.github.com/users/maraoz/orgs","repos_url":"https://api.github.com/users/maraoz/repos","events_url":"https://api.github.com/users/maraoz/events{/privacy}","received_events_url":"https://api.github.com/users/maraoz/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-24T22:22:59Z","updated_at":"2015-02-26T13:12:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c031deec4eb4ab0d7bacde14c1f3432f74ce90a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitpay/bitcore-node/pulls/18/commits","review_comments_url":"https://api.github.com/repos/bitpay/bitcore-node/pulls/18/comments","review_comment_url":"https://api.github.com/repos/bitpay/bitcore-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitpay/bitcore-node/issues/18/comments","statuses_url":"https://api.github.com/repos/bitpay/bitcore-node/statuses/df04857bb494d8ec6887e49f77e6ddf3e6b01951","head":{"label":"maraoz:add/networkmanager","ref":"add/networkmanager","sha":"df04857bb494d8ec6887e49f77e6ddf3e6b01951","user":{"login":"maraoz","id":287189,"avatar_url":"https://avatars.githubusercontent.com/u/287189?v=3","gravatar_id":"","url":"https://api.github.com/users/maraoz","html_url":"https://github.com/maraoz","followers_url":"https://api.github.com/users/maraoz/followers","following_url":"https://api.github.com/users/maraoz/following{/other_user}","gists_url":"https://api.github.com/users/maraoz/gists{/gist_id}","starred_url":"https://api.github.com/users/maraoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maraoz/subscriptions","organizations_url":"https://api.github.com/users/maraoz/orgs","repos_url":"https://api.github.com/users/maraoz/repos","events_url":"https://api.github.com/users/maraoz/events{/privacy}","received_events_url":"https://api.github.com/users/maraoz/received_events","type":"User","site_admin":false},"repo":{"id":31275550,"name":"bitcore-node","full_name":"maraoz/bitcore-node","owner":{"login":"maraoz","id":287189,"avatar_url":"https://avatars.githubusercontent.com/u/287189?v=3","gravatar_id":"","url":"https://api.github.com/users/maraoz","html_url":"https://github.com/maraoz","followers_url":"https://api.github.com/users/maraoz/followers","following_url":"https://api.github.com/users/maraoz/following{/other_user}","gists_url":"https://api.github.com/users/maraoz/gists{/gist_id}","starred_url":"https://api.github.com/users/maraoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maraoz/subscriptions","organizations_url":"https://api.github.com/users/maraoz/orgs","repos_url":"https://api.github.com/users/maraoz/repos","events_url":"https://api.github.com/users/maraoz/events{/privacy}","received_events_url":"https://api.github.com/users/maraoz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maraoz/bitcore-node","description":"Full node with extended capabilities using bitcore and Bitcoin Core","fork":true,"url":"https://api.github.com/repos/maraoz/bitcore-node","forks_url":"https://api.github.com/repos/maraoz/bitcore-node/forks","keys_url":"https://api.github.com/repos/maraoz/bitcore-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maraoz/bitcore-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maraoz/bitcore-node/teams","hooks_url":"https://api.github.com/repos/maraoz/bitcore-node/hooks","issue_events_url":"https://api.github.com/repos/maraoz/bitcore-node/issues/events{/number}","events_url":"https://api.github.com/repos/maraoz/bitcore-node/events","assignees_url":"https://api.github.com/repos/maraoz/bitcore-node/assignees{/user}","branches_url":"https://api.github.com/repos/maraoz/bitcore-node/branches{/branch}","tags_url":"https://api.github.com/repos/maraoz/bitcore-node/tags","blobs_url":"https://api.github.com/repos/maraoz/bitcore-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maraoz/bitcore-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maraoz/bitcore-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/maraoz/bitcore-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maraoz/bitcore-node/statuses/{sha}","languages_url":"https://api.github.com/repos/maraoz/bitcore-node/languages","stargazers_url":"https://api.github.com/repos/maraoz/bitcore-node/stargazers","contributors_url":"https://api.github.com/repos/maraoz/bitcore-node/contributors","subscribers_url":"https://api.github.com/repos/maraoz/bitcore-node/subscribers","subscription_url":"https://api.github.com/repos/maraoz/bitcore-node/subscription","commits_url":"https://api.github.com/repos/maraoz/bitcore-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/maraoz/bitcore-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/maraoz/bitcore-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/maraoz/bitcore-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/maraoz/bitcore-node/contents/{+path}","compare_url":"https://api.github.com/repos/maraoz/bitcore-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maraoz/bitcore-node/merges","archive_url":"https://api.github.com/repos/maraoz/bitcore-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maraoz/bitcore-node/downloads","issues_url":"https://api.github.com/repos/maraoz/bitcore-node/issues{/number}","pulls_url":"https://api.github.com/repos/maraoz/bitcore-node/pulls{/number}","milestones_url":"https://api.github.com/repos/maraoz/bitcore-node/milestones{/number}","notifications_url":"https://api.github.com/repos/maraoz/bitcore-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maraoz/bitcore-node/labels{/name}","releases_url":"https://api.github.com/repos/maraoz/bitcore-node/releases{/id}","created_at":"2015-02-24T18:41:49Z","updated_at":"2015-02-24T18:41:50Z","pushed_at":"2015-02-25T21:48:30Z","git_url":"git://github.com/maraoz/bitcore-node.git","ssh_url":"git@github.com:maraoz/bitcore-node.git","clone_url":"https://github.com/maraoz/bitcore-node.git","svn_url":"https://github.com/maraoz/bitcore-node","homepage":"","size":2516,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bitpay:master","ref":"master","sha":"5d2d17cb38eee04a73c495d5f94a6519823610ed","user":{"login":"bitpay","id":2554930,"avatar_url":"https://avatars.githubusercontent.com/u/2554930?v=3","gravatar_id":"","url":"https://api.github.com/users/bitpay","html_url":"https://github.com/bitpay","followers_url":"https://api.github.com/users/bitpay/followers","following_url":"https://api.github.com/users/bitpay/following{/other_user}","gists_url":"https://api.github.com/users/bitpay/gists{/gist_id}","starred_url":"https://api.github.com/users/bitpay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitpay/subscriptions","organizations_url":"https://api.github.com/users/bitpay/orgs","repos_url":"https://api.github.com/users/bitpay/repos","events_url":"https://api.github.com/users/bitpay/events{/privacy}","received_events_url":"https://api.github.com/users/bitpay/received_events","type":"Organization","site_admin":false},"repo":{"id":30316427,"name":"bitcore-node","full_name":"bitpay/bitcore-node","owner":{"login":"bitpay","id":2554930,"avatar_url":"https://avatars.githubusercontent.com/u/2554930?v=3","gravatar_id":"","url":"https://api.github.com/users/bitpay","html_url":"https://github.com/bitpay","followers_url":"https://api.github.com/users/bitpay/followers","following_url":"https://api.github.com/users/bitpay/following{/other_user}","gists_url":"https://api.github.com/users/bitpay/gists{/gist_id}","starred_url":"https://api.github.com/users/bitpay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitpay/subscriptions","organizations_url":"https://api.github.com/users/bitpay/orgs","repos_url":"https://api.github.com/users/bitpay/repos","events_url":"https://api.github.com/users/bitpay/events{/privacy}","received_events_url":"https://api.github.com/users/bitpay/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitpay/bitcore-node","description":"Full node with extended capabilities using bitcore and Bitcoin Core","fork":false,"url":"https://api.github.com/repos/bitpay/bitcore-node","forks_url":"https://api.github.com/repos/bitpay/bitcore-node/forks","keys_url":"https://api.github.com/repos/bitpay/bitcore-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitpay/bitcore-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitpay/bitcore-node/teams","hooks_url":"https://api.github.com/repos/bitpay/bitcore-node/hooks","issue_events_url":"https://api.github.com/repos/bitpay/bitcore-node/issues/events{/number}","events_url":"https://api.github.com/repos/bitpay/bitcore-node/events","assignees_url":"https://api.github.com/repos/bitpay/bitcore-node/assignees{/user}","branches_url":"https://api.github.com/repos/bitpay/bitcore-node/branches{/branch}","tags_url":"https://api.github.com/repos/bitpay/bitcore-node/tags","blobs_url":"https://api.github.com/repos/bitpay/bitcore-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitpay/bitcore-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitpay/bitcore-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitpay/bitcore-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitpay/bitcore-node/statuses/{sha}","languages_url":"https://api.github.com/repos/bitpay/bitcore-node/languages","stargazers_url":"https://api.github.com/repos/bitpay/bitcore-node/stargazers","contributors_url":"https://api.github.com/repos/bitpay/bitcore-node/contributors","subscribers_url":"https://api.github.com/repos/bitpay/bitcore-node/subscribers","subscription_url":"https://api.github.com/repos/bitpay/bitcore-node/subscription","commits_url":"https://api.github.com/repos/bitpay/bitcore-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitpay/bitcore-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitpay/bitcore-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitpay/bitcore-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitpay/bitcore-node/contents/{+path}","compare_url":"https://api.github.com/repos/bitpay/bitcore-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitpay/bitcore-node/merges","archive_url":"https://api.github.com/repos/bitpay/bitcore-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitpay/bitcore-node/downloads","issues_url":"https://api.github.com/repos/bitpay/bitcore-node/issues{/number}","pulls_url":"https://api.github.com/repos/bitpay/bitcore-node/pulls{/number}","milestones_url":"https://api.github.com/repos/bitpay/bitcore-node/milestones{/number}","notifications_url":"https://api.github.com/repos/bitpay/bitcore-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitpay/bitcore-node/labels{/name}","releases_url":"https://api.github.com/repos/bitpay/bitcore-node/releases{/id}","created_at":"2015-02-04T19:20:50Z","updated_at":"2015-02-24T18:41:42Z","pushed_at":"2015-02-20T21:55:28Z","git_url":"git://github.com/bitpay/bitcore-node.git","ssh_url":"git@github.com:bitpay/bitcore-node.git","clone_url":"https://github.com/bitpay/bitcore-node.git","svn_url":"https://github.com/bitpay/bitcore-node","homepage":"","size":2788,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":7,"forks":3,"open_issues":7,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitpay/bitcore-node/pulls/18"},"html":{"href":"https://github.com/bitpay/bitcore-node/pull/18"},"issue":{"href":"https://api.github.com/repos/bitpay/bitcore-node/issues/18"},"comments":{"href":"https://api.github.com/repos/bitpay/bitcore-node/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/bitpay/bitcore-node/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/bitpay/bitcore-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitpay/bitcore-node/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/bitpay/bitcore-node/statuses/df04857bb494d8ec6887e49f77e6ddf3e6b01951"}}}}