{"action":"created","comment":{"url":"https://api.github.com/repos/hapijs/good-squeeze/pulls/comments/56363028","id":56363028,"diff_hunk":"@@ -1,35 +1,23 @@\n-var Stream = require('stream');\n-var Hoek = require('hoek');\n-var Stringify = require('json-stringify-safe');\n+'use strict';\n \n-var internals = {\n-    defaults: {\n-        separator: ''\n-    }\n-};\n+const Stream = require('stream');\n+const Stringify = require('json-stringify-safe');\n \n-internals.SafeJson = module.exports = function (options, transformOptions) {\n+class SafeJson extends Stream.Transform {\n+    constructor(options, stringify) {\n \n-    if (!(this instanceof internals.SafeJson)) {\n-        return new internals.SafeJson(options, transformOptions);\n+        options = Object.assign({}, options, {\n+            objectMode: true\n+        });\n+        super(options);\n+        this._stringify = Object.assign({}, {\n+            separator: ''\n+        }, stringify);\n     }\n+    _transform(data, enc, next) {\n \n-    options = options || {};\n-    options.objectMode = true;\n-    transformOptions = transformOptions || {};\n-\n-    Stream.Transform.call(this, options);\n-\n-    var config = Hoek.applyToDefaults(internals.defaults, transformOptions);\n-    this._transformOptions = config;\n-};\n-\n-\n-Hoek.inherits(internals.SafeJson, Stream.Transform);\n-\n-\n-internals.SafeJson.prototype._transform = function (data, enc, next) {\n+        next(null, `${Stringify(data)}${this._stringify.separator}`);\n+    }\n+}\n \n-    this.push(Stringify(data) + this._transformOptions.separator);\n-    next(null);\n-};\n+module.exports = SafeJson;","path":"lib/safe-json.js","position":52,"original_position":52,"commit_id":"26a462fef33ff24e32d638d18f08914bb469ddf0","original_commit_id":"26a462fef33ff24e32d638d18f08914bb469ddf0","user":{"login":"geek","id":441346,"avatar_url":"https://avatars.githubusercontent.com/u/441346?v=3","gravatar_id":"","url":"https://api.github.com/users/geek","html_url":"https://github.com/geek","followers_url":"https://api.github.com/users/geek/followers","following_url":"https://api.github.com/users/geek/following{/other_user}","gists_url":"https://api.github.com/users/geek/gists{/gist_id}","starred_url":"https://api.github.com/users/geek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geek/subscriptions","organizations_url":"https://api.github.com/users/geek/orgs","repos_url":"https://api.github.com/users/geek/repos","events_url":"https://api.github.com/users/geek/events{/privacy}","received_events_url":"https://api.github.com/users/geek/received_events","type":"User","site_admin":false},"body":"can this not go before `class` ?\r\n","created_at":"2016-03-16T16:11:17Z","updated_at":"2016-03-16T16:11:17Z","html_url":"https://github.com/hapijs/good-squeeze/pull/12#discussion_r56363028","pull_request_url":"https://api.github.com/repos/hapijs/good-squeeze/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/hapijs/good-squeeze/pulls/comments/56363028"},"html":{"href":"https://github.com/hapijs/good-squeeze/pull/12#discussion_r56363028"},"pull_request":{"href":"https://api.github.com/repos/hapijs/good-squeeze/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/hapijs/good-squeeze/pulls/12","id":63071156,"html_url":"https://github.com/hapijs/good-squeeze/pull/12","diff_url":"https://github.com/hapijs/good-squeeze/pull/12.diff","patch_url":"https://github.com/hapijs/good-squeeze/pull/12.patch","issue_url":"https://api.github.com/repos/hapijs/good-squeeze/issues/12","number":12,"state":"open","locked":false,"title":"New Version updates","user":{"login":"arb","id":1591483,"avatar_url":"https://avatars.githubusercontent.com/u/1591483?v=3","gravatar_id":"","url":"https://api.github.com/users/arb","html_url":"https://github.com/arb","followers_url":"https://api.github.com/users/arb/followers","following_url":"https://api.github.com/users/arb/following{/other_user}","gists_url":"https://api.github.com/users/arb/gists{/gist_id}","starred_url":"https://api.github.com/users/arb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arb/subscriptions","organizations_url":"https://api.github.com/users/arb/orgs","repos_url":"https://api.github.com/users/arb/repos","events_url":"https://api.github.com/users/arb/events{/privacy}","received_events_url":"https://api.github.com/users/arb/received_events","type":"User","site_admin":false},"body":"- es2015 updates. Closes #10.\r\n- Dependency updates. Closes #11.","created_at":"2016-03-16T14:16:44Z","updated_at":"2016-03-16T16:11:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5906271190db3038405ffbe4516fa3aad2e2bbf2","assignee":{"login":"arb","id":1591483,"avatar_url":"https://avatars.githubusercontent.com/u/1591483?v=3","gravatar_id":"","url":"https://api.github.com/users/arb","html_url":"https://github.com/arb","followers_url":"https://api.github.com/users/arb/followers","following_url":"https://api.github.com/users/arb/following{/other_user}","gists_url":"https://api.github.com/users/arb/gists{/gist_id}","starred_url":"https://api.github.com/users/arb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arb/subscriptions","organizations_url":"https://api.github.com/users/arb/orgs","repos_url":"https://api.github.com/users/arb/repos","events_url":"https://api.github.com/users/arb/events{/privacy}","received_events_url":"https://api.github.com/users/arb/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/hapijs/good-squeeze/milestones/5","html_url":"https://github.com/hapijs/good-squeeze/milestones/3.0.0","labels_url":"https://api.github.com/repos/hapijs/good-squeeze/milestones/5/labels","id":1134562,"number":5,"title":"3.0.0","description":"","creator":{"login":"arb","id":1591483,"avatar_url":"https://avatars.githubusercontent.com/u/1591483?v=3","gravatar_id":"","url":"https://api.github.com/users/arb","html_url":"https://github.com/arb","followers_url":"https://api.github.com/users/arb/followers","following_url":"https://api.github.com/users/arb/following{/other_user}","gists_url":"https://api.github.com/users/arb/gists{/gist_id}","starred_url":"https://api.github.com/users/arb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arb/subscriptions","organizations_url":"https://api.github.com/users/arb/orgs","repos_url":"https://api.github.com/users/arb/repos","events_url":"https://api.github.com/users/arb/events{/privacy}","received_events_url":"https://api.github.com/users/arb/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2015-05-26T18:52:07Z","updated_at":"2016-03-16T14:16:59Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/hapijs/good-squeeze/pulls/12/commits","review_comments_url":"https://api.github.com/repos/hapijs/good-squeeze/pulls/12/comments","review_comment_url":"https://api.github.com/repos/hapijs/good-squeeze/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hapijs/good-squeeze/issues/12/comments","statuses_url":"https://api.github.com/repos/hapijs/good-squeeze/statuses/26a462fef33ff24e32d638d18f08914bb469ddf0","head":{"label":"hapijs:updates","ref":"updates","sha":"26a462fef33ff24e32d638d18f08914bb469ddf0","user":{"login":"hapijs","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?v=3","gravatar_id":"","url":"https://api.github.com/users/hapijs","html_url":"https://github.com/hapijs","followers_url":"https://api.github.com/users/hapijs/followers","following_url":"https://api.github.com/users/hapijs/following{/other_user}","gists_url":"https://api.github.com/users/hapijs/gists{/gist_id}","starred_url":"https://api.github.com/users/hapijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hapijs/subscriptions","organizations_url":"https://api.github.com/users/hapijs/orgs","repos_url":"https://api.github.com/users/hapijs/repos","events_url":"https://api.github.com/users/hapijs/events{/privacy}","received_events_url":"https://api.github.com/users/hapijs/received_events","type":"Organization","site_admin":false},"repo":{"id":29483421,"name":"good-squeeze","full_name":"hapijs/good-squeeze","owner":{"login":"hapijs","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?v=3","gravatar_id":"","url":"https://api.github.com/users/hapijs","html_url":"https://github.com/hapijs","followers_url":"https://api.github.com/users/hapijs/followers","following_url":"https://api.github.com/users/hapijs/following{/other_user}","gists_url":"https://api.github.com/users/hapijs/gists{/gist_id}","starred_url":"https://api.github.com/users/hapijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hapijs/subscriptions","organizations_url":"https://api.github.com/users/hapijs/orgs","repos_url":"https://api.github.com/users/hapijs/repos","events_url":"https://api.github.com/users/hapijs/events{/privacy}","received_events_url":"https://api.github.com/users/hapijs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hapijs/good-squeeze","description":"Simple transform stream for event filtering with good.","fork":false,"url":"https://api.github.com/repos/hapijs/good-squeeze","forks_url":"https://api.github.com/repos/hapijs/good-squeeze/forks","keys_url":"https://api.github.com/repos/hapijs/good-squeeze/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hapijs/good-squeeze/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hapijs/good-squeeze/teams","hooks_url":"https://api.github.com/repos/hapijs/good-squeeze/hooks","issue_events_url":"https://api.github.com/repos/hapijs/good-squeeze/issues/events{/number}","events_url":"https://api.github.com/repos/hapijs/good-squeeze/events","assignees_url":"https://api.github.com/repos/hapijs/good-squeeze/assignees{/user}","branches_url":"https://api.github.com/repos/hapijs/good-squeeze/branches{/branch}","tags_url":"https://api.github.com/repos/hapijs/good-squeeze/tags","blobs_url":"https://api.github.com/repos/hapijs/good-squeeze/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hapijs/good-squeeze/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hapijs/good-squeeze/git/refs{/sha}","trees_url":"https://api.github.com/repos/hapijs/good-squeeze/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hapijs/good-squeeze/statuses/{sha}","languages_url":"https://api.github.com/repos/hapijs/good-squeeze/languages","stargazers_url":"https://api.github.com/repos/hapijs/good-squeeze/stargazers","contributors_url":"https://api.github.com/repos/hapijs/good-squeeze/contributors","subscribers_url":"https://api.github.com/repos/hapijs/good-squeeze/subscribers","subscription_url":"https://api.github.com/repos/hapijs/good-squeeze/subscription","commits_url":"https://api.github.com/repos/hapijs/good-squeeze/commits{/sha}","git_commits_url":"https://api.github.com/repos/hapijs/good-squeeze/git/commits{/sha}","comments_url":"https://api.github.com/repos/hapijs/good-squeeze/comments{/number}","issue_comment_url":"https://api.github.com/repos/hapijs/good-squeeze/issues/comments{/number}","contents_url":"https://api.github.com/repos/hapijs/good-squeeze/contents/{+path}","compare_url":"https://api.github.com/repos/hapijs/good-squeeze/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hapijs/good-squeeze/merges","archive_url":"https://api.github.com/repos/hapijs/good-squeeze/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hapijs/good-squeeze/downloads","issues_url":"https://api.github.com/repos/hapijs/good-squeeze/issues{/number}","pulls_url":"https://api.github.com/repos/hapijs/good-squeeze/pulls{/number}","milestones_url":"https://api.github.com/repos/hapijs/good-squeeze/milestones{/number}","notifications_url":"https://api.github.com/repos/hapijs/good-squeeze/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hapijs/good-squeeze/labels{/name}","releases_url":"https://api.github.com/repos/hapijs/good-squeeze/releases{/id}","deployments_url":"https://api.github.com/repos/hapijs/good-squeeze/deployments","created_at":"2015-01-19T17:50:14Z","updated_at":"2016-01-26T04:52:30Z","pushed_at":"2016-03-16T14:32:08Z","git_url":"git://github.com/hapijs/good-squeeze.git","ssh_url":"git@github.com:hapijs/good-squeeze.git","clone_url":"https://github.com/hapijs/good-squeeze.git","svn_url":"https://github.com/hapijs/good-squeeze","homepage":null,"size":19,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":5,"default_branch":"master"}},"base":{"label":"hapijs:master","ref":"master","sha":"5f695d5370b56da7f13003421668b1e47a85d3d2","user":{"login":"hapijs","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?v=3","gravatar_id":"","url":"https://api.github.com/users/hapijs","html_url":"https://github.com/hapijs","followers_url":"https://api.github.com/users/hapijs/followers","following_url":"https://api.github.com/users/hapijs/following{/other_user}","gists_url":"https://api.github.com/users/hapijs/gists{/gist_id}","starred_url":"https://api.github.com/users/hapijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hapijs/subscriptions","organizations_url":"https://api.github.com/users/hapijs/orgs","repos_url":"https://api.github.com/users/hapijs/repos","events_url":"https://api.github.com/users/hapijs/events{/privacy}","received_events_url":"https://api.github.com/users/hapijs/received_events","type":"Organization","site_admin":false},"repo":{"id":29483421,"name":"good-squeeze","full_name":"hapijs/good-squeeze","owner":{"login":"hapijs","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?v=3","gravatar_id":"","url":"https://api.github.com/users/hapijs","html_url":"https://github.com/hapijs","followers_url":"https://api.github.com/users/hapijs/followers","following_url":"https://api.github.com/users/hapijs/following{/other_user}","gists_url":"https://api.github.com/users/hapijs/gists{/gist_id}","starred_url":"https://api.github.com/users/hapijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hapijs/subscriptions","organizations_url":"https://api.github.com/users/hapijs/orgs","repos_url":"https://api.github.com/users/hapijs/repos","events_url":"https://api.github.com/users/hapijs/events{/privacy}","received_events_url":"https://api.github.com/users/hapijs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hapijs/good-squeeze","description":"Simple transform stream for event filtering with good.","fork":false,"url":"https://api.github.com/repos/hapijs/good-squeeze","forks_url":"https://api.github.com/repos/hapijs/good-squeeze/forks","keys_url":"https://api.github.com/repos/hapijs/good-squeeze/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hapijs/good-squeeze/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hapijs/good-squeeze/teams","hooks_url":"https://api.github.com/repos/hapijs/good-squeeze/hooks","issue_events_url":"https://api.github.com/repos/hapijs/good-squeeze/issues/events{/number}","events_url":"https://api.github.com/repos/hapijs/good-squeeze/events","assignees_url":"https://api.github.com/repos/hapijs/good-squeeze/assignees{/user}","branches_url":"https://api.github.com/repos/hapijs/good-squeeze/branches{/branch}","tags_url":"https://api.github.com/repos/hapijs/good-squeeze/tags","blobs_url":"https://api.github.com/repos/hapijs/good-squeeze/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hapijs/good-squeeze/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hapijs/good-squeeze/git/refs{/sha}","trees_url":"https://api.github.com/repos/hapijs/good-squeeze/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hapijs/good-squeeze/statuses/{sha}","languages_url":"https://api.github.com/repos/hapijs/good-squeeze/languages","stargazers_url":"https://api.github.com/repos/hapijs/good-squeeze/stargazers","contributors_url":"https://api.github.com/repos/hapijs/good-squeeze/contributors","subscribers_url":"https://api.github.com/repos/hapijs/good-squeeze/subscribers","subscription_url":"https://api.github.com/repos/hapijs/good-squeeze/subscription","commits_url":"https://api.github.com/repos/hapijs/good-squeeze/commits{/sha}","git_commits_url":"https://api.github.com/repos/hapijs/good-squeeze/git/commits{/sha}","comments_url":"https://api.github.com/repos/hapijs/good-squeeze/comments{/number}","issue_comment_url":"https://api.github.com/repos/hapijs/good-squeeze/issues/comments{/number}","contents_url":"https://api.github.com/repos/hapijs/good-squeeze/contents/{+path}","compare_url":"https://api.github.com/repos/hapijs/good-squeeze/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hapijs/good-squeeze/merges","archive_url":"https://api.github.com/repos/hapijs/good-squeeze/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hapijs/good-squeeze/downloads","issues_url":"https://api.github.com/repos/hapijs/good-squeeze/issues{/number}","pulls_url":"https://api.github.com/repos/hapijs/good-squeeze/pulls{/number}","milestones_url":"https://api.github.com/repos/hapijs/good-squeeze/milestones{/number}","notifications_url":"https://api.github.com/repos/hapijs/good-squeeze/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hapijs/good-squeeze/labels{/name}","releases_url":"https://api.github.com/repos/hapijs/good-squeeze/releases{/id}","deployments_url":"https://api.github.com/repos/hapijs/good-squeeze/deployments","created_at":"2015-01-19T17:50:14Z","updated_at":"2016-01-26T04:52:30Z","pushed_at":"2016-03-16T14:32:08Z","git_url":"git://github.com/hapijs/good-squeeze.git","ssh_url":"git@github.com:hapijs/good-squeeze.git","clone_url":"https://github.com/hapijs/good-squeeze.git","svn_url":"https://github.com/hapijs/good-squeeze","homepage":null,"size":19,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hapijs/good-squeeze/pulls/12"},"html":{"href":"https://github.com/hapijs/good-squeeze/pull/12"},"issue":{"href":"https://api.github.com/repos/hapijs/good-squeeze/issues/12"},"comments":{"href":"https://api.github.com/repos/hapijs/good-squeeze/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/hapijs/good-squeeze/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/hapijs/good-squeeze/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hapijs/good-squeeze/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/hapijs/good-squeeze/statuses/26a462fef33ff24e32d638d18f08914bb469ddf0"}}}}