{"action":"created","comment":{"url":"https://api.github.com/repos/ipfs/js-ipfs/pulls/comments/106165869","pull_request_review_id":27074247,"id":106165869,"diff_hunk":"@@ -9,39 +9,60 @@ const multihash = require('multihashes')\n const PeerBook = require('peer-book')\n const CID = require('cids')\n const debug = require('debug')\n+const extend = require('deep-extend')\n+const series = require('async/series')\n+const EventEmitter = require('events')\n \n const defaultRepo = require('./default-repo')\n \n const components = require('./components')\n \n-class IPFS {\n-  constructor (configOpts) {\n-    configOpts = configOpts || {}\n-    let repoInstance\n-    if (typeof configOpts.repo === 'string' || configOpts.repo === undefined) {\n-      repoInstance = defaultRepo(configOpts.repo)\n-    } else {\n-      repoInstance = configOpts.repo\n+class IPFS extends EventEmitter {\n+  constructor (options) {\n+    super()\n+\n+    this._options = {\n+      init: true,\n+      start: true,\n+      EXPERIMENTAL: {}\n     }\n-    delete configOpts.repo\n \n-    configOpts.EXPERIMENTAL = configOpts.EXPERIMENTAL || {}\n+    extend(this._options, options)\n \n-    // IPFS utils\n-    this.types = {\n-      Buffer,\n-      PeerId,\n-      PeerInfo,\n-      multiaddr,\n-      multihash,\n-      CID\n+    if (typeof options.init === 'boolean' &&\n+        options.init === false) {\n+      this._options.init = false\n+    }\n+\n+    if (!(\n+        typeof options.start === 'boolean' &&","path":"src/core/index.js","position":48,"original_position":48,"commit_id":"0b97d97437d9ef44be57df96ca6ca093a91c530a","original_commit_id":"0b97d97437d9ef44be57df96ca6ca093a91c530a","user":{"login":"dignifiedquire","id":790842,"avatar_url":"https://avatars3.githubusercontent.com/u/790842?v=3","gravatar_id":"","url":"https://api.github.com/users/dignifiedquire","html_url":"https://github.com/dignifiedquire","followers_url":"https://api.github.com/users/dignifiedquire/followers","following_url":"https://api.github.com/users/dignifiedquire/following{/other_user}","gists_url":"https://api.github.com/users/dignifiedquire/gists{/gist_id}","starred_url":"https://api.github.com/users/dignifiedquire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dignifiedquire/subscriptions","organizations_url":"https://api.github.com/users/dignifiedquire/orgs","repos_url":"https://api.github.com/users/dignifiedquire/repos","events_url":"https://api.github.com/users/dignifiedquire/events{/privacy}","received_events_url":"https://api.github.com/users/dignifiedquire/received_events","type":"User","site_admin":false},"body":"strange line break","created_at":"2017-03-15T13:37:55Z","updated_at":"2017-03-15T13:37:55Z","html_url":"https://github.com/ipfs/js-ipfs/pull/790#discussion_r106165869","pull_request_url":"https://api.github.com/repos/ipfs/js-ipfs/pulls/790","_links":{"self":{"href":"https://api.github.com/repos/ipfs/js-ipfs/pulls/comments/106165869"},"html":{"href":"https://github.com/ipfs/js-ipfs/pull/790#discussion_r106165869"},"pull_request":{"href":"https://api.github.com/repos/ipfs/js-ipfs/pulls/790"}}},"pull_request":{"url":"https://api.github.com/repos/ipfs/js-ipfs/pulls/790","id":110703986,"html_url":"https://github.com/ipfs/js-ipfs/pull/790","diff_url":"https://github.com/ipfs/js-ipfs/pull/790.diff","patch_url":"https://github.com/ipfs/js-ipfs/pull/790.patch","issue_url":"https://api.github.com/repos/ipfs/js-ipfs/issues/790","number":790,"state":"open","locked":false,"title":"WIP - All new way of initing a node.","user":{"login":"diasdavid","id":1211152,"avatar_url":"https://avatars3.githubusercontent.com/u/1211152?v=3","gravatar_id":"","url":"https://api.github.com/users/diasdavid","html_url":"https://github.com/diasdavid","followers_url":"https://api.github.com/users/diasdavid/followers","following_url":"https://api.github.com/users/diasdavid/following{/other_user}","gists_url":"https://api.github.com/users/diasdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/diasdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasdavid/subscriptions","organizations_url":"https://api.github.com/users/diasdavid/orgs","repos_url":"https://api.github.com/users/diasdavid/repos","events_url":"https://api.github.com/users/diasdavid/events{/privacy}","received_events_url":"https://api.github.com/users/diasdavid/received_events","type":"User","site_admin":false},"body":"For https://github.com/ipfs/docs/issues/22","created_at":"2017-03-14T19:53:34Z","updated_at":"2017-03-15T13:37:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"46142bd85f224ded73af892d8956a675aab5b505","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ipfs/js-ipfs/pulls/790/commits","review_comments_url":"https://api.github.com/repos/ipfs/js-ipfs/pulls/790/comments","review_comment_url":"https://api.github.com/repos/ipfs/js-ipfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ipfs/js-ipfs/issues/790/comments","statuses_url":"https://api.github.com/repos/ipfs/js-ipfs/statuses/0b97d97437d9ef44be57df96ca6ca093a91c530a","head":{"label":"ipfs:feat/new-init","ref":"feat/new-init","sha":"0b97d97437d9ef44be57df96ca6ca093a91c530a","user":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars3.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"repo":{"id":20312497,"name":"js-ipfs","full_name":"ipfs/js-ipfs","owner":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars3.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ipfs/js-ipfs","description":"IPFS implementation in JavaScript","fork":false,"url":"https://api.github.com/repos/ipfs/js-ipfs","forks_url":"https://api.github.com/repos/ipfs/js-ipfs/forks","keys_url":"https://api.github.com/repos/ipfs/js-ipfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipfs/js-ipfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipfs/js-ipfs/teams","hooks_url":"https://api.github.com/repos/ipfs/js-ipfs/hooks","issue_events_url":"https://api.github.com/repos/ipfs/js-ipfs/issues/events{/number}","events_url":"https://api.github.com/repos/ipfs/js-ipfs/events","assignees_url":"https://api.github.com/repos/ipfs/js-ipfs/assignees{/user}","branches_url":"https://api.github.com/repos/ipfs/js-ipfs/branches{/branch}","tags_url":"https://api.github.com/repos/ipfs/js-ipfs/tags","blobs_url":"https://api.github.com/repos/ipfs/js-ipfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipfs/js-ipfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipfs/js-ipfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipfs/js-ipfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipfs/js-ipfs/statuses/{sha}","languages_url":"https://api.github.com/repos/ipfs/js-ipfs/languages","stargazers_url":"https://api.github.com/repos/ipfs/js-ipfs/stargazers","contributors_url":"https://api.github.com/repos/ipfs/js-ipfs/contributors","subscribers_url":"https://api.github.com/repos/ipfs/js-ipfs/subscribers","subscription_url":"https://api.github.com/repos/ipfs/js-ipfs/subscription","commits_url":"https://api.github.com/repos/ipfs/js-ipfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipfs/js-ipfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipfs/js-ipfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipfs/js-ipfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ipfs/js-ipfs/contents/{+path}","compare_url":"https://api.github.com/repos/ipfs/js-ipfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipfs/js-ipfs/merges","archive_url":"https://api.github.com/repos/ipfs/js-ipfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipfs/js-ipfs/downloads","issues_url":"https://api.github.com/repos/ipfs/js-ipfs/issues{/number}","pulls_url":"https://api.github.com/repos/ipfs/js-ipfs/pulls{/number}","milestones_url":"https://api.github.com/repos/ipfs/js-ipfs/milestones{/number}","notifications_url":"https://api.github.com/repos/ipfs/js-ipfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipfs/js-ipfs/labels{/name}","releases_url":"https://api.github.com/repos/ipfs/js-ipfs/releases{/id}","deployments_url":"https://api.github.com/repos/ipfs/js-ipfs/deployments","created_at":"2014-05-30T00:31:06Z","updated_at":"2017-03-14T22:45:31Z","pushed_at":"2017-03-15T13:30:55Z","git_url":"git://github.com/ipfs/js-ipfs.git","ssh_url":"git@github.com:ipfs/js-ipfs.git","clone_url":"https://github.com/ipfs/js-ipfs.git","svn_url":"https://github.com/ipfs/js-ipfs","homepage":"https://ipfs.io","size":3249,"stargazers_count":831,"watchers_count":831,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":118,"mirror_url":null,"open_issues_count":55,"forks":118,"open_issues":55,"watchers":831,"default_branch":"master"}},"base":{"label":"ipfs:master","ref":"master","sha":"669fc28f1f17dbed2351ff32cb619f05646a10d9","user":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars3.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"repo":{"id":20312497,"name":"js-ipfs","full_name":"ipfs/js-ipfs","owner":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars3.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ipfs/js-ipfs","description":"IPFS implementation in JavaScript","fork":false,"url":"https://api.github.com/repos/ipfs/js-ipfs","forks_url":"https://api.github.com/repos/ipfs/js-ipfs/forks","keys_url":"https://api.github.com/repos/ipfs/js-ipfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipfs/js-ipfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipfs/js-ipfs/teams","hooks_url":"https://api.github.com/repos/ipfs/js-ipfs/hooks","issue_events_url":"https://api.github.com/repos/ipfs/js-ipfs/issues/events{/number}","events_url":"https://api.github.com/repos/ipfs/js-ipfs/events","assignees_url":"https://api.github.com/repos/ipfs/js-ipfs/assignees{/user}","branches_url":"https://api.github.com/repos/ipfs/js-ipfs/branches{/branch}","tags_url":"https://api.github.com/repos/ipfs/js-ipfs/tags","blobs_url":"https://api.github.com/repos/ipfs/js-ipfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipfs/js-ipfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipfs/js-ipfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipfs/js-ipfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipfs/js-ipfs/statuses/{sha}","languages_url":"https://api.github.com/repos/ipfs/js-ipfs/languages","stargazers_url":"https://api.github.com/repos/ipfs/js-ipfs/stargazers","contributors_url":"https://api.github.com/repos/ipfs/js-ipfs/contributors","subscribers_url":"https://api.github.com/repos/ipfs/js-ipfs/subscribers","subscription_url":"https://api.github.com/repos/ipfs/js-ipfs/subscription","commits_url":"https://api.github.com/repos/ipfs/js-ipfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipfs/js-ipfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipfs/js-ipfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipfs/js-ipfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ipfs/js-ipfs/contents/{+path}","compare_url":"https://api.github.com/repos/ipfs/js-ipfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipfs/js-ipfs/merges","archive_url":"https://api.github.com/repos/ipfs/js-ipfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipfs/js-ipfs/downloads","issues_url":"https://api.github.com/repos/ipfs/js-ipfs/issues{/number}","pulls_url":"https://api.github.com/repos/ipfs/js-ipfs/pulls{/number}","milestones_url":"https://api.github.com/repos/ipfs/js-ipfs/milestones{/number}","notifications_url":"https://api.github.com/repos/ipfs/js-ipfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipfs/js-ipfs/labels{/name}","releases_url":"https://api.github.com/repos/ipfs/js-ipfs/releases{/id}","deployments_url":"https://api.github.com/repos/ipfs/js-ipfs/deployments","created_at":"2014-05-30T00:31:06Z","updated_at":"2017-03-14T22:45:31Z","pushed_at":"2017-03-15T13:30:55Z","git_url":"git://github.com/ipfs/js-ipfs.git","ssh_url":"git@github.com:ipfs/js-ipfs.git","clone_url":"https://github.com/ipfs/js-ipfs.git","svn_url":"https://github.com/ipfs/js-ipfs","homepage":"https://ipfs.io","size":3249,"stargazers_count":831,"watchers_count":831,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":118,"mirror_url":null,"open_issues_count":55,"forks":118,"open_issues":55,"watchers":831,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ipfs/js-ipfs/pulls/790"},"html":{"href":"https://github.com/ipfs/js-ipfs/pull/790"},"issue":{"href":"https://api.github.com/repos/ipfs/js-ipfs/issues/790"},"comments":{"href":"https://api.github.com/repos/ipfs/js-ipfs/issues/790/comments"},"review_comments":{"href":"https://api.github.com/repos/ipfs/js-ipfs/pulls/790/comments"},"review_comment":{"href":"https://api.github.com/repos/ipfs/js-ipfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ipfs/js-ipfs/pulls/790/commits"},"statuses":{"href":"https://api.github.com/repos/ipfs/js-ipfs/statuses/0b97d97437d9ef44be57df96ca6ca093a91c530a"}}}}
{"actor":{"display_login":"dignifiedquire"}}