{"action":"created","comment":{"url":"https://api.github.com/repos/dojo/core/pulls/comments/30923279","id":30923279,"diff_hunk":"@@ -0,0 +1,379 @@\n+const BASE64_KEYSTR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n+\n+function normalizeEncodingArgs(data: any, alternateCodec: any): [ string, ByteBuffer ]{\n+\tdata = String(data);\n+\n+\treturn [ data, <ByteBuffer> {\n+\t\ttoString: function (codec?: any): string {\n+\t\t\treturn (codec || alternateCodec).decode(this);\n+\t\t},\n+\t\ttoJSON: function (): string {\n+\t\t\treturn JSON.stringify(Array.prototype.slice.call(this));\n+\t\t},\n+\t\tlength: data.length\n+\t}];\n+}\n+\n+function validateDecodingArgs(data: any) {\n+\tif (data == null) {\n+\t\treturn false;\n+\t}\n+\n+\tif (data.length == null) {\n+\t\tthrow new TypeError('Argument must have a length property');\n+\t}\n+\n+\treturn true;\n+}\n+\n+function validateUtf8EncodedCodePoint(codePoint: number): void {\n+\tif ((codePoint & 0xC0) !== 0x80) {\n+\t\tthrow Error('Invalid continuation byte');\n+\t}\n+}\n+\n+function decodeUtf8EncodedCodePoint(codePoint: number, validationRange: number[] = [0, Infinity], checkSurrogate?: boolean): string {","path":"src/encoding.ts","position":35,"original_position":35,"commit_id":"129e39cb3f9c71177e069114fbe79c2db8b0c867","original_commit_id":"129e39cb3f9c71177e069114fbe79c2db8b0c867","user":{"login":"kfranqueiro","id":398379,"avatar_url":"https://avatars.githubusercontent.com/u/398379?v=3","gravatar_id":"","url":"https://api.github.com/users/kfranqueiro","html_url":"https://github.com/kfranqueiro","followers_url":"https://api.github.com/users/kfranqueiro/followers","following_url":"https://api.github.com/users/kfranqueiro/following{/other_user}","gists_url":"https://api.github.com/users/kfranqueiro/gists{/gist_id}","starred_url":"https://api.github.com/users/kfranqueiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kfranqueiro/subscriptions","organizations_url":"https://api.github.com/users/kfranqueiro/orgs","repos_url":"https://api.github.com/users/kfranqueiro/repos","events_url":"https://api.github.com/users/kfranqueiro/events{/privacy}","received_events_url":"https://api.github.com/users/kfranqueiro/received_events","type":"User","site_admin":false},"body":"Space after `[` and before `]` in default value","created_at":"2015-05-22T19:14:57Z","updated_at":"2015-05-22T19:14:57Z","html_url":"https://github.com/dojo/core/pull/16#discussion_r30923279","pull_request_url":"https://api.github.com/repos/dojo/core/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/dojo/core/pulls/comments/30923279"},"html":{"href":"https://github.com/dojo/core/pull/16#discussion_r30923279"},"pull_request":{"href":"https://api.github.com/repos/dojo/core/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/dojo/core/pulls/16","id":35826045,"html_url":"https://github.com/dojo/core/pull/16","diff_url":"https://github.com/dojo/core/pull/16.diff","patch_url":"https://github.com/dojo/core/pull/16.patch","issue_url":"https://api.github.com/repos/dojo/core/issues/16","number":16,"state":"open","locked":false,"title":"Encodings: Ascii, Utf8, Hex and Base64","user":{"login":"jdonaghue","id":78551,"avatar_url":"https://avatars.githubusercontent.com/u/78551?v=3","gravatar_id":"","url":"https://api.github.com/users/jdonaghue","html_url":"https://github.com/jdonaghue","followers_url":"https://api.github.com/users/jdonaghue/followers","following_url":"https://api.github.com/users/jdonaghue/following{/other_user}","gists_url":"https://api.github.com/users/jdonaghue/gists{/gist_id}","starred_url":"https://api.github.com/users/jdonaghue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdonaghue/subscriptions","organizations_url":"https://api.github.com/users/jdonaghue/orgs","repos_url":"https://api.github.com/users/jdonaghue/repos","events_url":"https://api.github.com/users/jdonaghue/events{/privacy}","received_events_url":"https://api.github.com/users/jdonaghue/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-20T12:25:48Z","updated_at":"2015-05-22T19:14:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce3544e99b4ed8eaf4521eb9df956c86ad1523b7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dojo/core/pulls/16/commits","review_comments_url":"https://api.github.com/repos/dojo/core/pulls/16/comments","review_comment_url":"https://api.github.com/repos/dojo/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dojo/core/issues/16/comments","statuses_url":"https://api.github.com/repos/dojo/core/statuses/129e39cb3f9c71177e069114fbe79c2db8b0c867","head":{"label":"jdonaghue:jpd-encodings","ref":"jpd-encodings","sha":"129e39cb3f9c71177e069114fbe79c2db8b0c867","user":{"login":"jdonaghue","id":78551,"avatar_url":"https://avatars.githubusercontent.com/u/78551?v=3","gravatar_id":"","url":"https://api.github.com/users/jdonaghue","html_url":"https://github.com/jdonaghue","followers_url":"https://api.github.com/users/jdonaghue/followers","following_url":"https://api.github.com/users/jdonaghue/following{/other_user}","gists_url":"https://api.github.com/users/jdonaghue/gists{/gist_id}","starred_url":"https://api.github.com/users/jdonaghue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdonaghue/subscriptions","organizations_url":"https://api.github.com/users/jdonaghue/orgs","repos_url":"https://api.github.com/users/jdonaghue/repos","events_url":"https://api.github.com/users/jdonaghue/events{/privacy}","received_events_url":"https://api.github.com/users/jdonaghue/received_events","type":"User","site_admin":false},"repo":{"id":35898146,"name":"core","full_name":"jdonaghue/core","owner":{"login":"jdonaghue","id":78551,"avatar_url":"https://avatars.githubusercontent.com/u/78551?v=3","gravatar_id":"","url":"https://api.github.com/users/jdonaghue","html_url":"https://github.com/jdonaghue","followers_url":"https://api.github.com/users/jdonaghue/followers","following_url":"https://api.github.com/users/jdonaghue/following{/other_user}","gists_url":"https://api.github.com/users/jdonaghue/gists{/gist_id}","starred_url":"https://api.github.com/users/jdonaghue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdonaghue/subscriptions","organizations_url":"https://api.github.com/users/jdonaghue/orgs","repos_url":"https://api.github.com/users/jdonaghue/repos","events_url":"https://api.github.com/users/jdonaghue/events{/privacy}","received_events_url":"https://api.github.com/users/jdonaghue/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jdonaghue/core","description":"Dojo 2 package containing TypeScript and JavaScript core utilities","fork":true,"url":"https://api.github.com/repos/jdonaghue/core","forks_url":"https://api.github.com/repos/jdonaghue/core/forks","keys_url":"https://api.github.com/repos/jdonaghue/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jdonaghue/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jdonaghue/core/teams","hooks_url":"https://api.github.com/repos/jdonaghue/core/hooks","issue_events_url":"https://api.github.com/repos/jdonaghue/core/issues/events{/number}","events_url":"https://api.github.com/repos/jdonaghue/core/events","assignees_url":"https://api.github.com/repos/jdonaghue/core/assignees{/user}","branches_url":"https://api.github.com/repos/jdonaghue/core/branches{/branch}","tags_url":"https://api.github.com/repos/jdonaghue/core/tags","blobs_url":"https://api.github.com/repos/jdonaghue/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jdonaghue/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jdonaghue/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/jdonaghue/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jdonaghue/core/statuses/{sha}","languages_url":"https://api.github.com/repos/jdonaghue/core/languages","stargazers_url":"https://api.github.com/repos/jdonaghue/core/stargazers","contributors_url":"https://api.github.com/repos/jdonaghue/core/contributors","subscribers_url":"https://api.github.com/repos/jdonaghue/core/subscribers","subscription_url":"https://api.github.com/repos/jdonaghue/core/subscription","commits_url":"https://api.github.com/repos/jdonaghue/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/jdonaghue/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/jdonaghue/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/jdonaghue/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/jdonaghue/core/contents/{+path}","compare_url":"https://api.github.com/repos/jdonaghue/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jdonaghue/core/merges","archive_url":"https://api.github.com/repos/jdonaghue/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jdonaghue/core/downloads","issues_url":"https://api.github.com/repos/jdonaghue/core/issues{/number}","pulls_url":"https://api.github.com/repos/jdonaghue/core/pulls{/number}","milestones_url":"https://api.github.com/repos/jdonaghue/core/milestones{/number}","notifications_url":"https://api.github.com/repos/jdonaghue/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jdonaghue/core/labels{/name}","releases_url":"https://api.github.com/repos/jdonaghue/core/releases{/id}","created_at":"2015-05-19T17:39:41Z","updated_at":"2015-05-19T17:39:42Z","pushed_at":"2015-05-20T12:24:13Z","git_url":"git://github.com/jdonaghue/core.git","ssh_url":"git@github.com:jdonaghue/core.git","clone_url":"https://github.com/jdonaghue/core.git","svn_url":"https://github.com/jdonaghue/core","homepage":"","size":480,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"dojo:master","ref":"master","sha":"8b3ba3aae0b12cff6a5670c5dbdde4e74fa6af6c","user":{"login":"dojo","id":86896,"avatar_url":"https://avatars.githubusercontent.com/u/86896?v=3","gravatar_id":"","url":"https://api.github.com/users/dojo","html_url":"https://github.com/dojo","followers_url":"https://api.github.com/users/dojo/followers","following_url":"https://api.github.com/users/dojo/following{/other_user}","gists_url":"https://api.github.com/users/dojo/gists{/gist_id}","starred_url":"https://api.github.com/users/dojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dojo/subscriptions","organizations_url":"https://api.github.com/users/dojo/orgs","repos_url":"https://api.github.com/users/dojo/repos","events_url":"https://api.github.com/users/dojo/events{/privacy}","received_events_url":"https://api.github.com/users/dojo/received_events","type":"Organization","site_admin":false},"repo":{"id":31790386,"name":"core","full_name":"dojo/core","owner":{"login":"dojo","id":86896,"avatar_url":"https://avatars.githubusercontent.com/u/86896?v=3","gravatar_id":"","url":"https://api.github.com/users/dojo","html_url":"https://github.com/dojo","followers_url":"https://api.github.com/users/dojo/followers","following_url":"https://api.github.com/users/dojo/following{/other_user}","gists_url":"https://api.github.com/users/dojo/gists{/gist_id}","starred_url":"https://api.github.com/users/dojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dojo/subscriptions","organizations_url":"https://api.github.com/users/dojo/orgs","repos_url":"https://api.github.com/users/dojo/repos","events_url":"https://api.github.com/users/dojo/events{/privacy}","received_events_url":"https://api.github.com/users/dojo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dojo/core","description":"Dojo 2 package containing TypeScript and JavaScript core utilities","fork":false,"url":"https://api.github.com/repos/dojo/core","forks_url":"https://api.github.com/repos/dojo/core/forks","keys_url":"https://api.github.com/repos/dojo/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dojo/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dojo/core/teams","hooks_url":"https://api.github.com/repos/dojo/core/hooks","issue_events_url":"https://api.github.com/repos/dojo/core/issues/events{/number}","events_url":"https://api.github.com/repos/dojo/core/events","assignees_url":"https://api.github.com/repos/dojo/core/assignees{/user}","branches_url":"https://api.github.com/repos/dojo/core/branches{/branch}","tags_url":"https://api.github.com/repos/dojo/core/tags","blobs_url":"https://api.github.com/repos/dojo/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dojo/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dojo/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/dojo/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dojo/core/statuses/{sha}","languages_url":"https://api.github.com/repos/dojo/core/languages","stargazers_url":"https://api.github.com/repos/dojo/core/stargazers","contributors_url":"https://api.github.com/repos/dojo/core/contributors","subscribers_url":"https://api.github.com/repos/dojo/core/subscribers","subscription_url":"https://api.github.com/repos/dojo/core/subscription","commits_url":"https://api.github.com/repos/dojo/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/dojo/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/dojo/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/dojo/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/dojo/core/contents/{+path}","compare_url":"https://api.github.com/repos/dojo/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dojo/core/merges","archive_url":"https://api.github.com/repos/dojo/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dojo/core/downloads","issues_url":"https://api.github.com/repos/dojo/core/issues{/number}","pulls_url":"https://api.github.com/repos/dojo/core/pulls{/number}","milestones_url":"https://api.github.com/repos/dojo/core/milestones{/number}","notifications_url":"https://api.github.com/repos/dojo/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dojo/core/labels{/name}","releases_url":"https://api.github.com/repos/dojo/core/releases{/id}","created_at":"2015-03-06T21:44:31Z","updated_at":"2015-05-21T03:06:13Z","pushed_at":"2015-05-21T16:36:55Z","git_url":"git://github.com/dojo/core.git","ssh_url":"git@github.com:dojo/core.git","clone_url":"https://github.com/dojo/core.git","svn_url":"https://github.com/dojo/core","homepage":"","size":1439,"stargazers_count":12,"watchers_count":12,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":7,"forks":14,"open_issues":7,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dojo/core/pulls/16"},"html":{"href":"https://github.com/dojo/core/pull/16"},"issue":{"href":"https://api.github.com/repos/dojo/core/issues/16"},"comments":{"href":"https://api.github.com/repos/dojo/core/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/dojo/core/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/dojo/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dojo/core/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/dojo/core/statuses/129e39cb3f9c71177e069114fbe79c2db8b0c867"}}}}