{"action":"created","issue":{"url":"https://api.github.com/repos/QQuick/Transcrypt/issues/147","repository_url":"https://api.github.com/repos/QQuick/Transcrypt","labels_url":"https://api.github.com/repos/QQuick/Transcrypt/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/QQuick/Transcrypt/issues/147/comments","events_url":"https://api.github.com/repos/QQuick/Transcrypt/issues/147/events","html_url":"https://github.com/QQuick/Transcrypt/issues/147","id":186941646,"number":147,"title":"str function should return a string primitive, not 'new String()'","user":{"login":"GULPF","id":1022431,"avatar_url":"https://avatars.githubusercontent.com/u/1022431?v=3","gravatar_id":"","url":"https://api.github.com/users/GULPF","html_url":"https://github.com/GULPF","followers_url":"https://api.github.com/users/GULPF/followers","following_url":"https://api.github.com/users/GULPF/following{/other_user}","gists_url":"https://api.github.com/users/GULPF/gists{/gist_id}","starred_url":"https://api.github.com/users/GULPF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GULPF/subscriptions","organizations_url":"https://api.github.com/users/GULPF/orgs","repos_url":"https://api.github.com/users/GULPF/repos","events_url":"https://api.github.com/users/GULPF/events{/privacy}","received_events_url":"https://api.github.com/users/GULPF/received_events","type":"User","site_admin":false},"labels":[{"id":299032446,"url":"https://api.github.com/repos/QQuick/Transcrypt/labels/enhancement","name":"enhancement","color":"0000ff","default":true}],"state":"closed","locked":false,"assignee":{"login":"JdeH","id":1730289,"avatar_url":"https://avatars.githubusercontent.com/u/1730289?v=3","gravatar_id":"","url":"https://api.github.com/users/JdeH","html_url":"https://github.com/JdeH","followers_url":"https://api.github.com/users/JdeH/followers","following_url":"https://api.github.com/users/JdeH/following{/other_user}","gists_url":"https://api.github.com/users/JdeH/gists{/gist_id}","starred_url":"https://api.github.com/users/JdeH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JdeH/subscriptions","organizations_url":"https://api.github.com/users/JdeH/orgs","repos_url":"https://api.github.com/users/JdeH/repos","events_url":"https://api.github.com/users/JdeH/events{/privacy}","received_events_url":"https://api.github.com/users/JdeH/received_events","type":"User","site_admin":false},"assignees":[{"login":"JdeH","id":1730289,"avatar_url":"https://avatars.githubusercontent.com/u/1730289?v=3","gravatar_id":"","url":"https://api.github.com/users/JdeH","html_url":"https://github.com/JdeH","followers_url":"https://api.github.com/users/JdeH/followers","following_url":"https://api.github.com/users/JdeH/following{/other_user}","gists_url":"https://api.github.com/users/JdeH/gists{/gist_id}","starred_url":"https://api.github.com/users/JdeH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JdeH/subscriptions","organizations_url":"https://api.github.com/users/JdeH/orgs","repos_url":"https://api.github.com/users/JdeH/repos","events_url":"https://api.github.com/users/JdeH/events{/privacy}","received_events_url":"https://api.github.com/users/JdeH/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-11-02T22:54:13Z","updated_at":"2016-11-05T18:33:46Z","closed_at":"2016-11-05T18:33:46Z","body":"Currently, the str function looks like this:\r\n```javascript\r\nfunction str (stringable) {\r\n  try {\r\n    return stringable.__str__ ();\r\n  }\r\n  catch (exception) {\r\n    return new String (stringable);\r\n    }\r\n}\r\n```\r\n\r\nBut it would be preferable to return `String(stringable)` (without 'new'). The class-like wrappers in JS (String, Number, Boolean) behaves weirdly in a lot of cases and should be avoided. F.ex, the current behavior results in situations like this one:\r\n\r\n```python\r\nx = ['1', '2', '3']\r\nprint('1' in x)    # true\r\nprint(str(1) in x) # false\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/QQuick/Transcrypt/issues/comments/258632008","html_url":"https://github.com/QQuick/Transcrypt/issues/147#issuecomment-258632008","issue_url":"https://api.github.com/repos/QQuick/Transcrypt/issues/147","id":258632008,"user":{"login":"JdeH","id":1730289,"avatar_url":"https://avatars.githubusercontent.com/u/1730289?v=3","gravatar_id":"","url":"https://api.github.com/users/JdeH","html_url":"https://github.com/JdeH","followers_url":"https://api.github.com/users/JdeH/followers","following_url":"https://api.github.com/users/JdeH/following{/other_user}","gists_url":"https://api.github.com/users/JdeH/gists{/gist_id}","starred_url":"https://api.github.com/users/JdeH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JdeH/subscriptions","organizations_url":"https://api.github.com/users/JdeH/orgs","repos_url":"https://api.github.com/users/JdeH/repos","events_url":"https://api.github.com/users/JdeH/events{/privacy}","received_events_url":"https://api.github.com/users/JdeH/received_events","type":"User","site_admin":false},"created_at":"2016-11-05T18:33:46Z","updated_at":"2016-11-05T18:33:46Z","body":"Done, is in 3.5.235"}}
{"actor":{"display_login":"JdeH"}}