{"action":"created","comment":{"url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls/comments/147072992","pull_request_review_id":72110518,"id":147072992,"diff_hunk":"@@ -0,0 +1,403 @@\n+/*!\n+ * ws: a node.js websocket client\n+ * Copyright(c) 2011 Einar Otto Stangvik <einaros@gmail.com>\n+ * MIT Licensed\n+ */\n+\n+'use strict';\n+\n+const safeBuffer = require('safe-buffer');\n+const crypto = require('crypto');\n+\n+const PerMessageDeflate = require('./PerMessageDeflate');\n+const bufferUtil = require('./BufferUtil');\n+const ErrorCodes = require('./ErrorCodes');\n+\n+const Buffer = safeBuffer.Buffer;\n+\n+/**\n+ * HyBi Sender implementation.\n+ */\n+class Sender {\n+  /**\n+   * Creates a Sender instance.\n+   *\n+   * @param {net.Socket} socket The connection socket\n+   * @param {Object} extensions An object containing the negotiated extensions\n+   */\n+  constructor (socket, extensions) {\n+    this.perMessageDeflate = (extensions || {})[PerMessageDeflate.extensionName];\n+    this._socket = socket;\n+\n+    this.firstFragment = true;\n+    this.compress = false;\n+\n+    this.bufferedBytes = 0;\n+    this.deflating = false;\n+    this.queue = [];\n+\n+    this.onerror = null;\n+  }\n+\n+  /**\n+   * Frames a piece of data according to the HyBi WebSocket protocol.\n+   *\n+   * @param {Buffer} data The data to frame\n+   * @param {Object} options Options object\n+   * @param {Number} options.opcode The opcode\n+   * @param {Boolean} options.readOnly Specifies whether `data` can be modified\n+   * @param {Boolean} options.fin Specifies whether or not to set the FIN bit\n+   * @param {Boolean} options.mask Specifies whether or not to mask `data`\n+   * @param {Boolean} options.rsv1 Specifies whether or not to set the RSV1 bit\n+   * @return {Buffer[]} The framed data as a list of `Buffer` instances\n+   * @public\n+   */\n+  static frame (data, options) {\n+    const merge = data.length < 1024 || (options.mask && options.readOnly);\n+    var offset = options.mask ? 6 : 2;\n+    var payloadLength = data.length;\n+\n+    if (data.length >= 65536) {\n+      offset += 8;\n+      payloadLength = 127;\n+    } else if (data.length > 125) {\n+      offset += 2;\n+      payloadLength = 126;\n+    }\n+\n+    const target = Buffer.allocUnsafe(merge ? data.length + offset : offset);","path":"node-js-basics-101/node_modules/ws/lib/Sender.js","position":68,"original_position":68,"commit_id":"d6372df3f4fb68ff34e59b491ff1d6ec0ebbb29b","original_commit_id":"d6372df3f4fb68ff34e59b491ff1d6ec0ebbb29b","user":{"login":"maheshk172","id":5226009,"avatar_url":"https://avatars0.githubusercontent.com/u/5226009?v=4","gravatar_id":"","url":"https://api.github.com/users/maheshk172","html_url":"https://github.com/maheshk172","followers_url":"https://api.github.com/users/maheshk172/followers","following_url":"https://api.github.com/users/maheshk172/following{/other_user}","gists_url":"https://api.github.com/users/maheshk172/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshk172/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshk172/subscriptions","organizations_url":"https://api.github.com/users/maheshk172/orgs","repos_url":"https://api.github.com/users/maheshk172/repos","events_url":"https://api.github.com/users/maheshk172/events{/privacy}","received_events_url":"https://api.github.com/users/maheshk172/received_events","type":"User","site_admin":false},"body":"__[jshint]__\n* 'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).\n\n<!-- Comment by [SideCI](https://sideci.com) -->","created_at":"2017-10-26T08:19:07Z","updated_at":"2017-10-26T08:19:07Z","html_url":"https://github.com/maheshk172/Javascript_and_framework_playground/pull/2#discussion_r147072992","pull_request_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls/2","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls/comments/147072992"},"html":{"href":"https://github.com/maheshk172/Javascript_and_framework_playground/pull/2#discussion_r147072992"},"pull_request":{"href":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls/2","id":148109658,"html_url":"https://github.com/maheshk172/Javascript_and_framework_playground/pull/2","diff_url":"https://github.com/maheshk172/Javascript_and_framework_playground/pull/2.diff","patch_url":"https://github.com/maheshk172/Javascript_and_framework_playground/pull/2.patch","issue_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/issues/2","number":2,"state":"closed","locked":false,"title":"Added some more code ","user":{"login":"maheshk172","id":5226009,"avatar_url":"https://avatars0.githubusercontent.com/u/5226009?v=4","gravatar_id":"","url":"https://api.github.com/users/maheshk172","html_url":"https://github.com/maheshk172","followers_url":"https://api.github.com/users/maheshk172/followers","following_url":"https://api.github.com/users/maheshk172/following{/other_user}","gists_url":"https://api.github.com/users/maheshk172/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshk172/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshk172/subscriptions","organizations_url":"https://api.github.com/users/maheshk172/orgs","repos_url":"https://api.github.com/users/maheshk172/repos","events_url":"https://api.github.com/users/maheshk172/events{/privacy}","received_events_url":"https://api.github.com/users/maheshk172/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-10-23T11:53:07Z","updated_at":"2017-10-26T08:19:07Z","closed_at":"2017-10-23T11:53:25Z","merged_at":"2017-10-23T11:53:25Z","merge_commit_sha":"fcb5e54e39f6e6926f54fe6d88ddcf785407a51f","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls/2/commits","review_comments_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls/2/comments","review_comment_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls/comments{/number}","comments_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/issues/2/comments","statuses_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/statuses/d6372df3f4fb68ff34e59b491ff1d6ec0ebbb29b","head":{"label":"maheshk172:Tesing-sideci-reviews","ref":"Tesing-sideci-reviews","sha":"d6372df3f4fb68ff34e59b491ff1d6ec0ebbb29b","user":{"login":"maheshk172","id":5226009,"avatar_url":"https://avatars0.githubusercontent.com/u/5226009?v=4","gravatar_id":"","url":"https://api.github.com/users/maheshk172","html_url":"https://github.com/maheshk172","followers_url":"https://api.github.com/users/maheshk172/followers","following_url":"https://api.github.com/users/maheshk172/following{/other_user}","gists_url":"https://api.github.com/users/maheshk172/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshk172/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshk172/subscriptions","organizations_url":"https://api.github.com/users/maheshk172/orgs","repos_url":"https://api.github.com/users/maheshk172/repos","events_url":"https://api.github.com/users/maheshk172/events{/privacy}","received_events_url":"https://api.github.com/users/maheshk172/received_events","type":"User","site_admin":false},"repo":{"id":22849782,"name":"Javascript_and_framework_playground","full_name":"maheshk172/Javascript_and_framework_playground","owner":{"login":"maheshk172","id":5226009,"avatar_url":"https://avatars0.githubusercontent.com/u/5226009?v=4","gravatar_id":"","url":"https://api.github.com/users/maheshk172","html_url":"https://github.com/maheshk172","followers_url":"https://api.github.com/users/maheshk172/followers","following_url":"https://api.github.com/users/maheshk172/following{/other_user}","gists_url":"https://api.github.com/users/maheshk172/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshk172/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshk172/subscriptions","organizations_url":"https://api.github.com/users/maheshk172/orgs","repos_url":"https://api.github.com/users/maheshk172/repos","events_url":"https://api.github.com/users/maheshk172/events{/privacy}","received_events_url":"https://api.github.com/users/maheshk172/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maheshk172/Javascript_and_framework_playground","description":null,"fork":false,"url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground","forks_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/forks","keys_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/teams","hooks_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/hooks","issue_events_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/issues/events{/number}","events_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/events","assignees_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/assignees{/user}","branches_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/branches{/branch}","tags_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/tags","blobs_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/git/refs{/sha}","trees_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/statuses/{sha}","languages_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/languages","stargazers_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/stargazers","contributors_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/contributors","subscribers_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/subscribers","subscription_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/subscription","commits_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/commits{/sha}","git_commits_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/git/commits{/sha}","comments_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/comments{/number}","issue_comment_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/issues/comments{/number}","contents_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/contents/{+path}","compare_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/merges","archive_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/downloads","issues_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/issues{/number}","pulls_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls{/number}","milestones_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/milestones{/number}","notifications_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/labels{/name}","releases_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/releases{/id}","deployments_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/deployments","created_at":"2014-08-11T18:27:03Z","updated_at":"2017-10-12T05:22:00Z","pushed_at":"2017-10-23T11:53:26Z","git_url":"git://github.com/maheshk172/Javascript_and_framework_playground.git","ssh_url":"git@github.com:maheshk172/Javascript_and_framework_playground.git","clone_url":"https://github.com/maheshk172/Javascript_and_framework_playground.git","svn_url":"https://github.com/maheshk172/Javascript_and_framework_playground","homepage":null,"size":2003,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"maheshk172:master","ref":"master","sha":"fc7f3cb472e52cae94372b552c6b4d550a4bf137","user":{"login":"maheshk172","id":5226009,"avatar_url":"https://avatars0.githubusercontent.com/u/5226009?v=4","gravatar_id":"","url":"https://api.github.com/users/maheshk172","html_url":"https://github.com/maheshk172","followers_url":"https://api.github.com/users/maheshk172/followers","following_url":"https://api.github.com/users/maheshk172/following{/other_user}","gists_url":"https://api.github.com/users/maheshk172/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshk172/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshk172/subscriptions","organizations_url":"https://api.github.com/users/maheshk172/orgs","repos_url":"https://api.github.com/users/maheshk172/repos","events_url":"https://api.github.com/users/maheshk172/events{/privacy}","received_events_url":"https://api.github.com/users/maheshk172/received_events","type":"User","site_admin":false},"repo":{"id":22849782,"name":"Javascript_and_framework_playground","full_name":"maheshk172/Javascript_and_framework_playground","owner":{"login":"maheshk172","id":5226009,"avatar_url":"https://avatars0.githubusercontent.com/u/5226009?v=4","gravatar_id":"","url":"https://api.github.com/users/maheshk172","html_url":"https://github.com/maheshk172","followers_url":"https://api.github.com/users/maheshk172/followers","following_url":"https://api.github.com/users/maheshk172/following{/other_user}","gists_url":"https://api.github.com/users/maheshk172/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshk172/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshk172/subscriptions","organizations_url":"https://api.github.com/users/maheshk172/orgs","repos_url":"https://api.github.com/users/maheshk172/repos","events_url":"https://api.github.com/users/maheshk172/events{/privacy}","received_events_url":"https://api.github.com/users/maheshk172/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maheshk172/Javascript_and_framework_playground","description":null,"fork":false,"url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground","forks_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/forks","keys_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/teams","hooks_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/hooks","issue_events_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/issues/events{/number}","events_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/events","assignees_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/assignees{/user}","branches_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/branches{/branch}","tags_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/tags","blobs_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/git/refs{/sha}","trees_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/statuses/{sha}","languages_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/languages","stargazers_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/stargazers","contributors_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/contributors","subscribers_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/subscribers","subscription_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/subscription","commits_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/commits{/sha}","git_commits_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/git/commits{/sha}","comments_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/comments{/number}","issue_comment_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/issues/comments{/number}","contents_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/contents/{+path}","compare_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/merges","archive_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/downloads","issues_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/issues{/number}","pulls_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls{/number}","milestones_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/milestones{/number}","notifications_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/labels{/name}","releases_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/releases{/id}","deployments_url":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/deployments","created_at":"2014-08-11T18:27:03Z","updated_at":"2017-10-12T05:22:00Z","pushed_at":"2017-10-23T11:53:26Z","git_url":"git://github.com/maheshk172/Javascript_and_framework_playground.git","ssh_url":"git@github.com:maheshk172/Javascript_and_framework_playground.git","clone_url":"https://github.com/maheshk172/Javascript_and_framework_playground.git","svn_url":"https://github.com/maheshk172/Javascript_and_framework_playground","homepage":null,"size":2003,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls/2"},"html":{"href":"https://github.com/maheshk172/Javascript_and_framework_playground/pull/2"},"issue":{"href":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/issues/2"},"comments":{"href":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/maheshk172/Javascript_and_framework_playground/statuses/d6372df3f4fb68ff34e59b491ff1d6ec0ebbb29b"}},"author_association":"OWNER"}}
{"actor":{"display_login":"maheshk172"}}