{"action":"created","comment":{"url":"https://api.github.com/repos/lorenwest/node-config/pulls/comments/44664665","id":44664665,"diff_hunk":"@@ -1423,6 +1423,21 @@ util.stripYamlComments = function(fileStr) {\n }\n \n /**\n+ * Strip all Javascript type comments from JSON strings.\n+ *\n+ * This method will call util.stripComments but has a simplified regex that\n+ * will work with JSON strings.\n+ *\n+ * @protected\n+ * @method stripJSONComments\n+ * @param fileString {string} The string to strip comments from\n+ * @return {string} The string with comments stripped.\n+ */\n+util.stripJSONComments = function(fileStr) {\n+  return util.stripComments(fileStr, /(\"[^\"]*\")/g);","path":"lib/config.js","position":24,"original_position":24,"commit_id":"0e3093ebba6f7112b768bbec74cf2e9452bb3ff3","original_commit_id":"0e3093ebba6f7112b768bbec74cf2e9452bb3ff3","user":{"login":"lorenwest","id":373538,"avatar_url":"https://avatars.githubusercontent.com/u/373538?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenwest","html_url":"https://github.com/lorenwest","followers_url":"https://api.github.com/users/lorenwest/followers","following_url":"https://api.github.com/users/lorenwest/following{/other_user}","gists_url":"https://api.github.com/users/lorenwest/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenwest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenwest/subscriptions","organizations_url":"https://api.github.com/users/lorenwest/orgs","repos_url":"https://api.github.com/users/lorenwest/repos","events_url":"https://api.github.com/users/lorenwest/events{/privacy}","received_events_url":"https://api.github.com/users/lorenwest/received_events","type":"User","site_admin":false},"body":"I'm not a regex guru.  Could you add a comment here describing this regex?  Something like\r\n```\r\n// Match everything starting with a quote up to and including a matching quote.\r\n```\r\nIt appears that this would miss a lot - such as /* ... */ comments, but I can't tell without a good description of the intention of this regex.","created_at":"2015-11-12T14:49:02Z","updated_at":"2015-11-12T14:49:02Z","html_url":"https://github.com/lorenwest/node-config/pull/258#discussion_r44664665","pull_request_url":"https://api.github.com/repos/lorenwest/node-config/pulls/258","_links":{"self":{"href":"https://api.github.com/repos/lorenwest/node-config/pulls/comments/44664665"},"html":{"href":"https://github.com/lorenwest/node-config/pull/258#discussion_r44664665"},"pull_request":{"href":"https://api.github.com/repos/lorenwest/node-config/pulls/258"}}},"pull_request":{"url":"https://api.github.com/repos/lorenwest/node-config/pulls/258","id":50409190,"html_url":"https://github.com/lorenwest/node-config/pull/258","diff_url":"https://github.com/lorenwest/node-config/pull/258.diff","patch_url":"https://github.com/lorenwest/node-config/pull/258.patch","issue_url":"https://api.github.com/repos/lorenwest/node-config/issues/258","number":258,"state":"open","locked":false,"title":"Correctly handle parsing of inline JSON","user":{"login":"elliotttf","id":447151,"avatar_url":"https://avatars.githubusercontent.com/u/447151?v=3","gravatar_id":"","url":"https://api.github.com/users/elliotttf","html_url":"https://github.com/elliotttf","followers_url":"https://api.github.com/users/elliotttf/followers","following_url":"https://api.github.com/users/elliotttf/following{/other_user}","gists_url":"https://api.github.com/users/elliotttf/gists{/gist_id}","starred_url":"https://api.github.com/users/elliotttf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliotttf/subscriptions","organizations_url":"https://api.github.com/users/elliotttf/orgs","repos_url":"https://api.github.com/users/elliotttf/repos","events_url":"https://api.github.com/users/elliotttf/events{/privacy}","received_events_url":"https://api.github.com/users/elliotttf/received_events","type":"User","site_admin":false},"body":"This arose becasue of the way comments are stripped from JSON. As comments will remain supported in node-config (#256) this change will correctly handle parsing JSON strings regardless of whether or not a comment is encountered.","created_at":"2015-11-11T17:11:40Z","updated_at":"2015-11-12T14:49:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48e59b959e7677cb5075e70e35cdbe892c31596d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lorenwest/node-config/pulls/258/commits","review_comments_url":"https://api.github.com/repos/lorenwest/node-config/pulls/258/comments","review_comment_url":"https://api.github.com/repos/lorenwest/node-config/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lorenwest/node-config/issues/258/comments","statuses_url":"https://api.github.com/repos/lorenwest/node-config/statuses/0e3093ebba6f7112b768bbec74cf2e9452bb3ff3","head":{"label":"elliotttf:inline-json","ref":"inline-json","sha":"0e3093ebba6f7112b768bbec74cf2e9452bb3ff3","user":{"login":"elliotttf","id":447151,"avatar_url":"https://avatars.githubusercontent.com/u/447151?v=3","gravatar_id":"","url":"https://api.github.com/users/elliotttf","html_url":"https://github.com/elliotttf","followers_url":"https://api.github.com/users/elliotttf/followers","following_url":"https://api.github.com/users/elliotttf/following{/other_user}","gists_url":"https://api.github.com/users/elliotttf/gists{/gist_id}","starred_url":"https://api.github.com/users/elliotttf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliotttf/subscriptions","organizations_url":"https://api.github.com/users/elliotttf/orgs","repos_url":"https://api.github.com/users/elliotttf/repos","events_url":"https://api.github.com/users/elliotttf/events{/privacy}","received_events_url":"https://api.github.com/users/elliotttf/received_events","type":"User","site_admin":false},"repo":{"id":45919219,"name":"node-config","full_name":"elliotttf/node-config","owner":{"login":"elliotttf","id":447151,"avatar_url":"https://avatars.githubusercontent.com/u/447151?v=3","gravatar_id":"","url":"https://api.github.com/users/elliotttf","html_url":"https://github.com/elliotttf","followers_url":"https://api.github.com/users/elliotttf/followers","following_url":"https://api.github.com/users/elliotttf/following{/other_user}","gists_url":"https://api.github.com/users/elliotttf/gists{/gist_id}","starred_url":"https://api.github.com/users/elliotttf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliotttf/subscriptions","organizations_url":"https://api.github.com/users/elliotttf/orgs","repos_url":"https://api.github.com/users/elliotttf/repos","events_url":"https://api.github.com/users/elliotttf/events{/privacy}","received_events_url":"https://api.github.com/users/elliotttf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elliotttf/node-config","description":"Node.js Application Configuration","fork":true,"url":"https://api.github.com/repos/elliotttf/node-config","forks_url":"https://api.github.com/repos/elliotttf/node-config/forks","keys_url":"https://api.github.com/repos/elliotttf/node-config/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elliotttf/node-config/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elliotttf/node-config/teams","hooks_url":"https://api.github.com/repos/elliotttf/node-config/hooks","issue_events_url":"https://api.github.com/repos/elliotttf/node-config/issues/events{/number}","events_url":"https://api.github.com/repos/elliotttf/node-config/events","assignees_url":"https://api.github.com/repos/elliotttf/node-config/assignees{/user}","branches_url":"https://api.github.com/repos/elliotttf/node-config/branches{/branch}","tags_url":"https://api.github.com/repos/elliotttf/node-config/tags","blobs_url":"https://api.github.com/repos/elliotttf/node-config/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elliotttf/node-config/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elliotttf/node-config/git/refs{/sha}","trees_url":"https://api.github.com/repos/elliotttf/node-config/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elliotttf/node-config/statuses/{sha}","languages_url":"https://api.github.com/repos/elliotttf/node-config/languages","stargazers_url":"https://api.github.com/repos/elliotttf/node-config/stargazers","contributors_url":"https://api.github.com/repos/elliotttf/node-config/contributors","subscribers_url":"https://api.github.com/repos/elliotttf/node-config/subscribers","subscription_url":"https://api.github.com/repos/elliotttf/node-config/subscription","commits_url":"https://api.github.com/repos/elliotttf/node-config/commits{/sha}","git_commits_url":"https://api.github.com/repos/elliotttf/node-config/git/commits{/sha}","comments_url":"https://api.github.com/repos/elliotttf/node-config/comments{/number}","issue_comment_url":"https://api.github.com/repos/elliotttf/node-config/issues/comments{/number}","contents_url":"https://api.github.com/repos/elliotttf/node-config/contents/{+path}","compare_url":"https://api.github.com/repos/elliotttf/node-config/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elliotttf/node-config/merges","archive_url":"https://api.github.com/repos/elliotttf/node-config/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elliotttf/node-config/downloads","issues_url":"https://api.github.com/repos/elliotttf/node-config/issues{/number}","pulls_url":"https://api.github.com/repos/elliotttf/node-config/pulls{/number}","milestones_url":"https://api.github.com/repos/elliotttf/node-config/milestones{/number}","notifications_url":"https://api.github.com/repos/elliotttf/node-config/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elliotttf/node-config/labels{/name}","releases_url":"https://api.github.com/repos/elliotttf/node-config/releases{/id}","created_at":"2015-11-10T15:01:24Z","updated_at":"2015-11-10T15:01:25Z","pushed_at":"2015-11-11T17:43:01Z","git_url":"git://github.com/elliotttf/node-config.git","ssh_url":"git@github.com:elliotttf/node-config.git","clone_url":"https://github.com/elliotttf/node-config.git","svn_url":"https://github.com/elliotttf/node-config","homepage":"","size":2236,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lorenwest:master","ref":"master","sha":"8befd411a8a25e9f27760de6a0dbeb43b90d0c75","user":{"login":"lorenwest","id":373538,"avatar_url":"https://avatars.githubusercontent.com/u/373538?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenwest","html_url":"https://github.com/lorenwest","followers_url":"https://api.github.com/users/lorenwest/followers","following_url":"https://api.github.com/users/lorenwest/following{/other_user}","gists_url":"https://api.github.com/users/lorenwest/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenwest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenwest/subscriptions","organizations_url":"https://api.github.com/users/lorenwest/orgs","repos_url":"https://api.github.com/users/lorenwest/repos","events_url":"https://api.github.com/users/lorenwest/events{/privacy}","received_events_url":"https://api.github.com/users/lorenwest/received_events","type":"User","site_admin":false},"repo":{"id":1130565,"name":"node-config","full_name":"lorenwest/node-config","owner":{"login":"lorenwest","id":373538,"avatar_url":"https://avatars.githubusercontent.com/u/373538?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenwest","html_url":"https://github.com/lorenwest","followers_url":"https://api.github.com/users/lorenwest/followers","following_url":"https://api.github.com/users/lorenwest/following{/other_user}","gists_url":"https://api.github.com/users/lorenwest/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenwest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenwest/subscriptions","organizations_url":"https://api.github.com/users/lorenwest/orgs","repos_url":"https://api.github.com/users/lorenwest/repos","events_url":"https://api.github.com/users/lorenwest/events{/privacy}","received_events_url":"https://api.github.com/users/lorenwest/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lorenwest/node-config","description":"Node.js Application Configuration","fork":false,"url":"https://api.github.com/repos/lorenwest/node-config","forks_url":"https://api.github.com/repos/lorenwest/node-config/forks","keys_url":"https://api.github.com/repos/lorenwest/node-config/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lorenwest/node-config/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lorenwest/node-config/teams","hooks_url":"https://api.github.com/repos/lorenwest/node-config/hooks","issue_events_url":"https://api.github.com/repos/lorenwest/node-config/issues/events{/number}","events_url":"https://api.github.com/repos/lorenwest/node-config/events","assignees_url":"https://api.github.com/repos/lorenwest/node-config/assignees{/user}","branches_url":"https://api.github.com/repos/lorenwest/node-config/branches{/branch}","tags_url":"https://api.github.com/repos/lorenwest/node-config/tags","blobs_url":"https://api.github.com/repos/lorenwest/node-config/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lorenwest/node-config/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lorenwest/node-config/git/refs{/sha}","trees_url":"https://api.github.com/repos/lorenwest/node-config/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lorenwest/node-config/statuses/{sha}","languages_url":"https://api.github.com/repos/lorenwest/node-config/languages","stargazers_url":"https://api.github.com/repos/lorenwest/node-config/stargazers","contributors_url":"https://api.github.com/repos/lorenwest/node-config/contributors","subscribers_url":"https://api.github.com/repos/lorenwest/node-config/subscribers","subscription_url":"https://api.github.com/repos/lorenwest/node-config/subscription","commits_url":"https://api.github.com/repos/lorenwest/node-config/commits{/sha}","git_commits_url":"https://api.github.com/repos/lorenwest/node-config/git/commits{/sha}","comments_url":"https://api.github.com/repos/lorenwest/node-config/comments{/number}","issue_comment_url":"https://api.github.com/repos/lorenwest/node-config/issues/comments{/number}","contents_url":"https://api.github.com/repos/lorenwest/node-config/contents/{+path}","compare_url":"https://api.github.com/repos/lorenwest/node-config/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lorenwest/node-config/merges","archive_url":"https://api.github.com/repos/lorenwest/node-config/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lorenwest/node-config/downloads","issues_url":"https://api.github.com/repos/lorenwest/node-config/issues{/number}","pulls_url":"https://api.github.com/repos/lorenwest/node-config/pulls{/number}","milestones_url":"https://api.github.com/repos/lorenwest/node-config/milestones{/number}","notifications_url":"https://api.github.com/repos/lorenwest/node-config/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lorenwest/node-config/labels{/name}","releases_url":"https://api.github.com/repos/lorenwest/node-config/releases{/id}","created_at":"2010-12-02T00:33:11Z","updated_at":"2015-11-12T08:12:37Z","pushed_at":"2015-11-11T17:43:02Z","git_url":"git://github.com/lorenwest/node-config.git","ssh_url":"git@github.com:lorenwest/node-config.git","clone_url":"https://github.com/lorenwest/node-config.git","svn_url":"https://github.com/lorenwest/node-config","homepage":"","size":3689,"stargazers_count":1048,"watchers_count":1048,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":123,"mirror_url":null,"open_issues_count":15,"forks":123,"open_issues":15,"watchers":1048,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lorenwest/node-config/pulls/258"},"html":{"href":"https://github.com/lorenwest/node-config/pull/258"},"issue":{"href":"https://api.github.com/repos/lorenwest/node-config/issues/258"},"comments":{"href":"https://api.github.com/repos/lorenwest/node-config/issues/258/comments"},"review_comments":{"href":"https://api.github.com/repos/lorenwest/node-config/pulls/258/comments"},"review_comment":{"href":"https://api.github.com/repos/lorenwest/node-config/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lorenwest/node-config/pulls/258/commits"},"statuses":{"href":"https://api.github.com/repos/lorenwest/node-config/statuses/0e3093ebba6f7112b768bbec74cf2e9452bb3ff3"}}}}