{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/43999362","id":43999362,"diff_hunk":"@@ -208,6 +223,9 @@ Returns `true` if the given \"object\" is a `Date`. `false` otherwise.\n     util.isDate({})\n       // false\n \n+note: This function uses `Object.prototype.toString.call` and check the returned value is `[object Date]`. However, `Symbol.toStringTag` can change the returned value directly.\n+\n+see [an example in util.isRegExp](#util_util_isRegExp)","path":"doc/api/util.markdown","position":28,"original_position":28,"commit_id":"612d513856f6d435b8dd01d3ba8fc51e3c1416c6","original_commit_id":"612d513856f6d435b8dd01d3ba8fc51e3c1416c6","user":{"login":"bnoordhuis","id":275871,"avatar_url":"https://avatars.githubusercontent.com/u/275871?v=3","gravatar_id":"","url":"https://api.github.com/users/bnoordhuis","html_url":"https://github.com/bnoordhuis","followers_url":"https://api.github.com/users/bnoordhuis/followers","following_url":"https://api.github.com/users/bnoordhuis/following{/other_user}","gists_url":"https://api.github.com/users/bnoordhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/bnoordhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnoordhuis/subscriptions","organizations_url":"https://api.github.com/users/bnoordhuis/orgs","repos_url":"https://api.github.com/users/bnoordhuis/repos","events_url":"https://api.github.com/users/bnoordhuis/events{/privacy}","received_events_url":"https://api.github.com/users/bnoordhuis/received_events","type":"User","site_admin":false},"body":"Capitalize and wrap here and below.","created_at":"2015-11-05T11:01:18Z","updated_at":"2015-11-05T11:01:18Z","html_url":"https://github.com/nodejs/node/pull/2201#discussion_r43999362","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/2201","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/43999362"},"html":{"href":"https://github.com/nodejs/node/pull/2201#discussion_r43999362"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/2201"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/2201","id":40286576,"html_url":"https://github.com/nodejs/node/pull/2201","diff_url":"https://github.com/nodejs/node/pull/2201.diff","patch_url":"https://github.com/nodejs/node/pull/2201.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/2201","number":2201,"state":"open","locked":false,"title":"doc: Add notes for using @@toStringTag","user":{"login":"yosuke-furukawa","id":555645,"avatar_url":"https://avatars.githubusercontent.com/u/555645?v=3","gravatar_id":"","url":"https://api.github.com/users/yosuke-furukawa","html_url":"https://github.com/yosuke-furukawa","followers_url":"https://api.github.com/users/yosuke-furukawa/followers","following_url":"https://api.github.com/users/yosuke-furukawa/following{/other_user}","gists_url":"https://api.github.com/users/yosuke-furukawa/gists{/gist_id}","starred_url":"https://api.github.com/users/yosuke-furukawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yosuke-furukawa/subscriptions","organizations_url":"https://api.github.com/users/yosuke-furukawa/orgs","repos_url":"https://api.github.com/users/yosuke-furukawa/repos","events_url":"https://api.github.com/users/yosuke-furukawa/events{/privacy}","received_events_url":"https://api.github.com/users/yosuke-furukawa/received_events","type":"User","site_admin":false},"body":"I checked `util.is*` functions. the following functions may be broken using ES2015 features.\r\n\r\n- util.isDate\r\n- util.isError\r\n- util.isRegExp\r\n\r\nthose functions use `Object.prototype.toString.call` to check the type.\r\nBut `@@toStringTag` can chage the returned value. `@@toStringTag` is enabled under `--harmony` on io.js v2.\r\n\r\nFor example,\r\n\r\n```javascript\r\nvar fakeRegExp = {}; \r\nfakeRegExp[Symbol.toStringTag] = 'RegExp';\r\nconsole.log(fakeRegExp.toString()); // [object RegExp]\r\nconsole.log(util.isRegExp(obj)); // true\r\n\r\nvar regexp = /a/;\r\nconsole.log(util.isRegExp(regexp)); // true\r\nRegExp.prototype[Symbol.toStringTag] = 'Array';\r\nconsole.log(util.isRegExp(regexp)); // false\r\n```\r\n\r\nThis PR is to add a notice in these util function.","created_at":"2015-07-18T04:34:54Z","updated_at":"2015-11-05T11:01:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"254853aca1aff0cd0a080a7aae11de191d226edb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/2201/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/2201/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/2201/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/612d513856f6d435b8dd01d3ba8fc51e3c1416c6","head":{"label":"yosuke-furukawa:add_symboltag_note","ref":"add_symboltag_note","sha":"612d513856f6d435b8dd01d3ba8fc51e3c1416c6","user":{"login":"yosuke-furukawa","id":555645,"avatar_url":"https://avatars.githubusercontent.com/u/555645?v=3","gravatar_id":"","url":"https://api.github.com/users/yosuke-furukawa","html_url":"https://github.com/yosuke-furukawa","followers_url":"https://api.github.com/users/yosuke-furukawa/followers","following_url":"https://api.github.com/users/yosuke-furukawa/following{/other_user}","gists_url":"https://api.github.com/users/yosuke-furukawa/gists{/gist_id}","starred_url":"https://api.github.com/users/yosuke-furukawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yosuke-furukawa/subscriptions","organizations_url":"https://api.github.com/users/yosuke-furukawa/orgs","repos_url":"https://api.github.com/users/yosuke-furukawa/repos","events_url":"https://api.github.com/users/yosuke-furukawa/events{/privacy}","received_events_url":"https://api.github.com/users/yosuke-furukawa/received_events","type":"User","site_admin":false},"repo":{"id":29194848,"name":"io.js","full_name":"yosuke-furukawa/io.js","owner":{"login":"yosuke-furukawa","id":555645,"avatar_url":"https://avatars.githubusercontent.com/u/555645?v=3","gravatar_id":"","url":"https://api.github.com/users/yosuke-furukawa","html_url":"https://github.com/yosuke-furukawa","followers_url":"https://api.github.com/users/yosuke-furukawa/followers","following_url":"https://api.github.com/users/yosuke-furukawa/following{/other_user}","gists_url":"https://api.github.com/users/yosuke-furukawa/gists{/gist_id}","starred_url":"https://api.github.com/users/yosuke-furukawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yosuke-furukawa/subscriptions","organizations_url":"https://api.github.com/users/yosuke-furukawa/orgs","repos_url":"https://api.github.com/users/yosuke-furukawa/repos","events_url":"https://api.github.com/users/yosuke-furukawa/events{/privacy}","received_events_url":"https://api.github.com/users/yosuke-furukawa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yosuke-furukawa/io.js","description":"A spork of Node.js with an open governance model","fork":true,"url":"https://api.github.com/repos/yosuke-furukawa/io.js","forks_url":"https://api.github.com/repos/yosuke-furukawa/io.js/forks","keys_url":"https://api.github.com/repos/yosuke-furukawa/io.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yosuke-furukawa/io.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yosuke-furukawa/io.js/teams","hooks_url":"https://api.github.com/repos/yosuke-furukawa/io.js/hooks","issue_events_url":"https://api.github.com/repos/yosuke-furukawa/io.js/issues/events{/number}","events_url":"https://api.github.com/repos/yosuke-furukawa/io.js/events","assignees_url":"https://api.github.com/repos/yosuke-furukawa/io.js/assignees{/user}","branches_url":"https://api.github.com/repos/yosuke-furukawa/io.js/branches{/branch}","tags_url":"https://api.github.com/repos/yosuke-furukawa/io.js/tags","blobs_url":"https://api.github.com/repos/yosuke-furukawa/io.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yosuke-furukawa/io.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yosuke-furukawa/io.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/yosuke-furukawa/io.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yosuke-furukawa/io.js/statuses/{sha}","languages_url":"https://api.github.com/repos/yosuke-furukawa/io.js/languages","stargazers_url":"https://api.github.com/repos/yosuke-furukawa/io.js/stargazers","contributors_url":"https://api.github.com/repos/yosuke-furukawa/io.js/contributors","subscribers_url":"https://api.github.com/repos/yosuke-furukawa/io.js/subscribers","subscription_url":"https://api.github.com/repos/yosuke-furukawa/io.js/subscription","commits_url":"https://api.github.com/repos/yosuke-furukawa/io.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/yosuke-furukawa/io.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/yosuke-furukawa/io.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/yosuke-furukawa/io.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/yosuke-furukawa/io.js/contents/{+path}","compare_url":"https://api.github.com/repos/yosuke-furukawa/io.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yosuke-furukawa/io.js/merges","archive_url":"https://api.github.com/repos/yosuke-furukawa/io.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yosuke-furukawa/io.js/downloads","issues_url":"https://api.github.com/repos/yosuke-furukawa/io.js/issues{/number}","pulls_url":"https://api.github.com/repos/yosuke-furukawa/io.js/pulls{/number}","milestones_url":"https://api.github.com/repos/yosuke-furukawa/io.js/milestones{/number}","notifications_url":"https://api.github.com/repos/yosuke-furukawa/io.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yosuke-furukawa/io.js/labels{/name}","releases_url":"https://api.github.com/repos/yosuke-furukawa/io.js/releases{/id}","created_at":"2015-01-13T14:58:31Z","updated_at":"2015-01-13T14:58:34Z","pushed_at":"2015-07-23T17:42:51Z","git_url":"git://github.com/yosuke-furukawa/io.js.git","ssh_url":"git@github.com:yosuke-furukawa/io.js.git","clone_url":"https://github.com/yosuke-furukawa/io.js.git","svn_url":"https://github.com/yosuke-furukawa/io.js","homepage":"","size":134312,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"v1.x"}},"base":{"label":"nodejs:master","ref":"master","sha":"6b0c906e6badbba64611feb766d57b233b64e5f9","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":27193779,"name":"node","full_name":"nodejs/node","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodejs/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":false,"url":"https://api.github.com/repos/nodejs/node","forks_url":"https://api.github.com/repos/nodejs/node/forks","keys_url":"https://api.github.com/repos/nodejs/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/node/teams","hooks_url":"https://api.github.com/repos/nodejs/node/hooks","issue_events_url":"https://api.github.com/repos/nodejs/node/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/node/events","assignees_url":"https://api.github.com/repos/nodejs/node/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/node/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/node/tags","blobs_url":"https://api.github.com/repos/nodejs/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/node/languages","stargazers_url":"https://api.github.com/repos/nodejs/node/stargazers","contributors_url":"https://api.github.com/repos/nodejs/node/contributors","subscribers_url":"https://api.github.com/repos/nodejs/node/subscribers","subscription_url":"https://api.github.com/repos/nodejs/node/subscription","commits_url":"https://api.github.com/repos/nodejs/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/node/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/node/merges","archive_url":"https://api.github.com/repos/nodejs/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/node/downloads","issues_url":"https://api.github.com/repos/nodejs/node/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/node/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/node/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/node/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/node/releases{/id}","created_at":"2014-11-26T19:57:11Z","updated_at":"2015-11-05T10:22:58Z","pushed_at":"2015-11-05T01:01:33Z","git_url":"git://github.com/nodejs/node.git","ssh_url":"git@github.com:nodejs/node.git","clone_url":"https://github.com/nodejs/node.git","svn_url":"https://github.com/nodejs/node","homepage":"https://nodejs.org","size":386926,"stargazers_count":17014,"watchers_count":17014,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1716,"mirror_url":null,"open_issues_count":556,"forks":1716,"open_issues":556,"watchers":17014,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/2201"},"html":{"href":"https://github.com/nodejs/node/pull/2201"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/2201"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/2201/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/2201/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/2201/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/612d513856f6d435b8dd01d3ba8fc51e3c1416c6"}}}}