{"action":"created","comment":{"url":"https://api.github.com/repos/rustwasm/wasm-bindgen/pulls/comments/197213607","pull_request_review_id":130914584,"id":197213607,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzIxMzYwNw==","diff_hunk":"@@ -0,0 +1,32 @@\n+#![allow(non_snake_case)]\n+\n+use project;\n+\n+#[test]\n+fn char_at() {\n+    project()\n+        .file(\"src/lib.rs\", r#\"\n+            #![feature(proc_macro, wasm_custom_section)]\n+\n+            extern crate wasm_bindgen;\n+            use wasm_bindgen::prelude::*;\n+            use wasm_bindgen::js;\n+\n+            #[wasm_bindgen]\n+            pub fn string_char_at(string: &js::String, index: i32) -> js::String {\n+                string.char_at(index)\n+            }\n+        \"#)\n+        .file(\"test.ts\", r#\"\n+            import * as assert from \"assert\";\n+            import * as wasm from \"./out\";\n+\n+            var anyString = 'Brave new world';","path":"tests/all/js_globals/String.rs","position":24,"original_position":24,"commit_id":"a0fae63f3ae809cf85d698968cfc3abe2a64434c","original_commit_id":"a0fae63f3ae809cf85d698968cfc3abe2a64434c","user":{"login":"elpiel","id":8925621,"node_id":"MDQ6VXNlcjg5MjU2MjE=","avatar_url":"https://avatars3.githubusercontent.com/u/8925621?v=4","gravatar_id":"","url":"https://api.github.com/users/elpiel","html_url":"https://github.com/elpiel","followers_url":"https://api.github.com/users/elpiel/followers","following_url":"https://api.github.com/users/elpiel/following{/other_user}","gists_url":"https://api.github.com/users/elpiel/gists{/gist_id}","starred_url":"https://api.github.com/users/elpiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elpiel/subscriptions","organizations_url":"https://api.github.com/users/elpiel/orgs","repos_url":"https://api.github.com/users/elpiel/repos","events_url":"https://api.github.com/users/elpiel/events{/privacy}","received_events_url":"https://api.github.com/users/elpiel/received_events","type":"User","site_admin":false},"body":"This is taken from the documentation. I haven't added a test case for default `index = 0` as I am not sure currently it's possible","created_at":"2018-06-21T17:20:39Z","updated_at":"2018-06-21T17:20:43Z","html_url":"https://github.com/rustwasm/wasm-bindgen/pull/286#discussion_r197213607","pull_request_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/pulls/286","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/rustwasm/wasm-bindgen/pulls/comments/197213607"},"html":{"href":"https://github.com/rustwasm/wasm-bindgen/pull/286#discussion_r197213607"},"pull_request":{"href":"https://api.github.com/repos/rustwasm/wasm-bindgen/pulls/286"}}},"pull_request":{"url":"https://api.github.com/repos/rustwasm/wasm-bindgen/pulls/286","id":196521379,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2NTIxMzc5","html_url":"https://github.com/rustwasm/wasm-bindgen/pull/286","diff_url":"https://github.com/rustwasm/wasm-bindgen/pull/286.diff","patch_url":"https://github.com/rustwasm/wasm-bindgen/pull/286.patch","issue_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/issues/286","number":286,"state":"open","locked":false,"title":"Add basic support for String.prototype.char_at()","user":{"login":"elpiel","id":8925621,"node_id":"MDQ6VXNlcjg5MjU2MjE=","avatar_url":"https://avatars3.githubusercontent.com/u/8925621?v=4","gravatar_id":"","url":"https://api.github.com/users/elpiel","html_url":"https://github.com/elpiel","followers_url":"https://api.github.com/users/elpiel/followers","following_url":"https://api.github.com/users/elpiel/following{/other_user}","gists_url":"https://api.github.com/users/elpiel/gists{/gist_id}","starred_url":"https://api.github.com/users/elpiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elpiel/subscriptions","organizations_url":"https://api.github.com/users/elpiel/orgs","repos_url":"https://api.github.com/users/elpiel/repos","events_url":"https://api.github.com/users/elpiel/events{/privacy}","received_events_url":"https://api.github.com/users/elpiel/received_events","type":"User","site_admin":false},"body":"I really would love to get some feedback.\r\nAlso one question I couldn't answer myself - what about optional parameters?\r\n`char_at()` has index, which by default should be 0, but in Rust there is no way to do it and I am not quite sure I understand the `wasn-bindgen` enough for that. Also some other implementations with optional value don't have it yet, e.g. `Array.prototype.includes()`\r\n\r\nI hope I can fully finish this PR.\r\n\r\nPS: Currently the Array and Object are not in Alphabetical order as in the Guidelines.","created_at":"2018-06-21T17:19:27Z","updated_at":"2018-06-21T17:20:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa6a8489e2baa10ccf365cda9ed3fbfcc50656fe","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/pulls/286/commits","review_comments_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/pulls/286/comments","review_comment_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/issues/286/comments","statuses_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/statuses/a0fae63f3ae809cf85d698968cfc3abe2a64434c","head":{"label":"elpiel:string-char_at","ref":"string-char_at","sha":"a0fae63f3ae809cf85d698968cfc3abe2a64434c","user":{"login":"elpiel","id":8925621,"node_id":"MDQ6VXNlcjg5MjU2MjE=","avatar_url":"https://avatars3.githubusercontent.com/u/8925621?v=4","gravatar_id":"","url":"https://api.github.com/users/elpiel","html_url":"https://github.com/elpiel","followers_url":"https://api.github.com/users/elpiel/followers","following_url":"https://api.github.com/users/elpiel/following{/other_user}","gists_url":"https://api.github.com/users/elpiel/gists{/gist_id}","starred_url":"https://api.github.com/users/elpiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elpiel/subscriptions","organizations_url":"https://api.github.com/users/elpiel/orgs","repos_url":"https://api.github.com/users/elpiel/repos","events_url":"https://api.github.com/users/elpiel/events{/privacy}","received_events_url":"https://api.github.com/users/elpiel/received_events","type":"User","site_admin":false},"repo":{"id":138064812,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgwNjQ4MTI=","name":"wasm-bindgen","full_name":"elpiel/wasm-bindgen","owner":{"login":"elpiel","id":8925621,"node_id":"MDQ6VXNlcjg5MjU2MjE=","avatar_url":"https://avatars3.githubusercontent.com/u/8925621?v=4","gravatar_id":"","url":"https://api.github.com/users/elpiel","html_url":"https://github.com/elpiel","followers_url":"https://api.github.com/users/elpiel/followers","following_url":"https://api.github.com/users/elpiel/following{/other_user}","gists_url":"https://api.github.com/users/elpiel/gists{/gist_id}","starred_url":"https://api.github.com/users/elpiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elpiel/subscriptions","organizations_url":"https://api.github.com/users/elpiel/orgs","repos_url":"https://api.github.com/users/elpiel/repos","events_url":"https://api.github.com/users/elpiel/events{/privacy}","received_events_url":"https://api.github.com/users/elpiel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elpiel/wasm-bindgen","description":"Facilitating high-level interactions between wasm modules and JavaScript","fork":true,"url":"https://api.github.com/repos/elpiel/wasm-bindgen","forks_url":"https://api.github.com/repos/elpiel/wasm-bindgen/forks","keys_url":"https://api.github.com/repos/elpiel/wasm-bindgen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elpiel/wasm-bindgen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elpiel/wasm-bindgen/teams","hooks_url":"https://api.github.com/repos/elpiel/wasm-bindgen/hooks","issue_events_url":"https://api.github.com/repos/elpiel/wasm-bindgen/issues/events{/number}","events_url":"https://api.github.com/repos/elpiel/wasm-bindgen/events","assignees_url":"https://api.github.com/repos/elpiel/wasm-bindgen/assignees{/user}","branches_url":"https://api.github.com/repos/elpiel/wasm-bindgen/branches{/branch}","tags_url":"https://api.github.com/repos/elpiel/wasm-bindgen/tags","blobs_url":"https://api.github.com/repos/elpiel/wasm-bindgen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elpiel/wasm-bindgen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elpiel/wasm-bindgen/git/refs{/sha}","trees_url":"https://api.github.com/repos/elpiel/wasm-bindgen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elpiel/wasm-bindgen/statuses/{sha}","languages_url":"https://api.github.com/repos/elpiel/wasm-bindgen/languages","stargazers_url":"https://api.github.com/repos/elpiel/wasm-bindgen/stargazers","contributors_url":"https://api.github.com/repos/elpiel/wasm-bindgen/contributors","subscribers_url":"https://api.github.com/repos/elpiel/wasm-bindgen/subscribers","subscription_url":"https://api.github.com/repos/elpiel/wasm-bindgen/subscription","commits_url":"https://api.github.com/repos/elpiel/wasm-bindgen/commits{/sha}","git_commits_url":"https://api.github.com/repos/elpiel/wasm-bindgen/git/commits{/sha}","comments_url":"https://api.github.com/repos/elpiel/wasm-bindgen/comments{/number}","issue_comment_url":"https://api.github.com/repos/elpiel/wasm-bindgen/issues/comments{/number}","contents_url":"https://api.github.com/repos/elpiel/wasm-bindgen/contents/{+path}","compare_url":"https://api.github.com/repos/elpiel/wasm-bindgen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elpiel/wasm-bindgen/merges","archive_url":"https://api.github.com/repos/elpiel/wasm-bindgen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elpiel/wasm-bindgen/downloads","issues_url":"https://api.github.com/repos/elpiel/wasm-bindgen/issues{/number}","pulls_url":"https://api.github.com/repos/elpiel/wasm-bindgen/pulls{/number}","milestones_url":"https://api.github.com/repos/elpiel/wasm-bindgen/milestones{/number}","notifications_url":"https://api.github.com/repos/elpiel/wasm-bindgen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elpiel/wasm-bindgen/labels{/name}","releases_url":"https://api.github.com/repos/elpiel/wasm-bindgen/releases{/id}","deployments_url":"https://api.github.com/repos/elpiel/wasm-bindgen/deployments","created_at":"2018-06-20T17:28:20Z","updated_at":"2018-06-20T17:28:22Z","pushed_at":"2018-06-21T17:15:40Z","git_url":"git://github.com/elpiel/wasm-bindgen.git","ssh_url":"git@github.com:elpiel/wasm-bindgen.git","clone_url":"https://github.com/elpiel/wasm-bindgen.git","svn_url":"https://github.com/elpiel/wasm-bindgen","homepage":"https://rustwasm.github.io/wasm-bindgen/","size":1677,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rustwasm:master","ref":"master","sha":"6ef817b350a945d078c3addea4e99dd4cd853436","user":{"login":"rustwasm","id":37272798,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MjcyNzk4","avatar_url":"https://avatars1.githubusercontent.com/u/37272798?v=4","gravatar_id":"","url":"https://api.github.com/users/rustwasm","html_url":"https://github.com/rustwasm","followers_url":"https://api.github.com/users/rustwasm/followers","following_url":"https://api.github.com/users/rustwasm/following{/other_user}","gists_url":"https://api.github.com/users/rustwasm/gists{/gist_id}","starred_url":"https://api.github.com/users/rustwasm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rustwasm/subscriptions","organizations_url":"https://api.github.com/users/rustwasm/orgs","repos_url":"https://api.github.com/users/rustwasm/repos","events_url":"https://api.github.com/users/rustwasm/events{/privacy}","received_events_url":"https://api.github.com/users/rustwasm/received_events","type":"Organization","site_admin":false},"repo":{"id":114685405,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQ2ODU0MDU=","name":"wasm-bindgen","full_name":"rustwasm/wasm-bindgen","owner":{"login":"rustwasm","id":37272798,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MjcyNzk4","avatar_url":"https://avatars1.githubusercontent.com/u/37272798?v=4","gravatar_id":"","url":"https://api.github.com/users/rustwasm","html_url":"https://github.com/rustwasm","followers_url":"https://api.github.com/users/rustwasm/followers","following_url":"https://api.github.com/users/rustwasm/following{/other_user}","gists_url":"https://api.github.com/users/rustwasm/gists{/gist_id}","starred_url":"https://api.github.com/users/rustwasm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rustwasm/subscriptions","organizations_url":"https://api.github.com/users/rustwasm/orgs","repos_url":"https://api.github.com/users/rustwasm/repos","events_url":"https://api.github.com/users/rustwasm/events{/privacy}","received_events_url":"https://api.github.com/users/rustwasm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rustwasm/wasm-bindgen","description":"Facilitating high-level interactions between wasm modules and JavaScript","fork":false,"url":"https://api.github.com/repos/rustwasm/wasm-bindgen","forks_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/forks","keys_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/teams","hooks_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/hooks","issue_events_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/issues/events{/number}","events_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/events","assignees_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/assignees{/user}","branches_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/branches{/branch}","tags_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/tags","blobs_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/git/refs{/sha}","trees_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/statuses/{sha}","languages_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/languages","stargazers_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/stargazers","contributors_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/contributors","subscribers_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/subscribers","subscription_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/subscription","commits_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/commits{/sha}","git_commits_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/git/commits{/sha}","comments_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/comments{/number}","issue_comment_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/issues/comments{/number}","contents_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/contents/{+path}","compare_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/merges","archive_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/downloads","issues_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/issues{/number}","pulls_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/pulls{/number}","milestones_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/milestones{/number}","notifications_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/labels{/name}","releases_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/releases{/id}","deployments_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/deployments","created_at":"2017-12-18T20:38:44Z","updated_at":"2018-06-21T16:38:59Z","pushed_at":"2018-06-21T17:19:28Z","git_url":"git://github.com/rustwasm/wasm-bindgen.git","ssh_url":"git@github.com:rustwasm/wasm-bindgen.git","clone_url":"https://github.com/rustwasm/wasm-bindgen.git","svn_url":"https://github.com/rustwasm/wasm-bindgen","homepage":"https://rustwasm.github.io/wasm-bindgen/","size":1723,"stargazers_count":866,"watchers_count":866,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":64,"mirror_url":null,"archived":false,"open_issues_count":63,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":64,"open_issues":63,"watchers":866,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rustwasm/wasm-bindgen/pulls/286"},"html":{"href":"https://github.com/rustwasm/wasm-bindgen/pull/286"},"issue":{"href":"https://api.github.com/repos/rustwasm/wasm-bindgen/issues/286"},"comments":{"href":"https://api.github.com/repos/rustwasm/wasm-bindgen/issues/286/comments"},"review_comments":{"href":"https://api.github.com/repos/rustwasm/wasm-bindgen/pulls/286/comments"},"review_comment":{"href":"https://api.github.com/repos/rustwasm/wasm-bindgen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rustwasm/wasm-bindgen/pulls/286/commits"},"statuses":{"href":"https://api.github.com/repos/rustwasm/wasm-bindgen/statuses/a0fae63f3ae809cf85d698968cfc3abe2a64434c"}},"author_association":"NONE"}}
{"actor":{"display_login":"elpiel"}}