{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/10292","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/10292/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/10292/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/10292/events","html_url":"https://github.com/nodejs/node/issues/10292","id":195921847,"number":10292,"title":"console.log and util.format should support the %i integer conversion","user":{"login":"jsinmotion","id":24595609,"avatar_url":"https://avatars.githubusercontent.com/u/24595609?v=3","gravatar_id":"","url":"https://api.github.com/users/jsinmotion","html_url":"https://github.com/jsinmotion","followers_url":"https://api.github.com/users/jsinmotion/followers","following_url":"https://api.github.com/users/jsinmotion/following{/other_user}","gists_url":"https://api.github.com/users/jsinmotion/gists{/gist_id}","starred_url":"https://api.github.com/users/jsinmotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsinmotion/subscriptions","organizations_url":"https://api.github.com/users/jsinmotion/orgs","repos_url":"https://api.github.com/users/jsinmotion/repos","events_url":"https://api.github.com/users/jsinmotion/events{/privacy}","received_events_url":"https://api.github.com/users/jsinmotion/received_events","type":"User","site_admin":false},"labels":[{"id":212828629,"url":"https://api.github.com/repos/nodejs/node/labels/console","name":"console","color":"ff88cc","default":false},{"id":279394827,"url":"https://api.github.com/repos/nodejs/node/labels/ctc-agenda","name":"ctc-agenda","color":"5319e7","default":false},{"id":207445406,"url":"https://api.github.com/repos/nodejs/node/labels/feature%20request","name":"feature request","color":"0D7BDE","default":false},{"id":155267446,"url":"https://api.github.com/repos/nodejs/node/labels/util","name":"util","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"silverwind","id":115237,"avatar_url":"https://avatars.githubusercontent.com/u/115237?v=3","gravatar_id":"","url":"https://api.github.com/users/silverwind","html_url":"https://github.com/silverwind","followers_url":"https://api.github.com/users/silverwind/followers","following_url":"https://api.github.com/users/silverwind/following{/other_user}","gists_url":"https://api.github.com/users/silverwind/gists{/gist_id}","starred_url":"https://api.github.com/users/silverwind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverwind/subscriptions","organizations_url":"https://api.github.com/users/silverwind/orgs","repos_url":"https://api.github.com/users/silverwind/repos","events_url":"https://api.github.com/users/silverwind/events{/privacy}","received_events_url":"https://api.github.com/users/silverwind/received_events","type":"User","site_admin":false},"assignees":[{"login":"silverwind","id":115237,"avatar_url":"https://avatars.githubusercontent.com/u/115237?v=3","gravatar_id":"","url":"https://api.github.com/users/silverwind","html_url":"https://github.com/silverwind","followers_url":"https://api.github.com/users/silverwind/followers","following_url":"https://api.github.com/users/silverwind/following{/other_user}","gists_url":"https://api.github.com/users/silverwind/gists{/gist_id}","starred_url":"https://api.github.com/users/silverwind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverwind/subscriptions","organizations_url":"https://api.github.com/users/silverwind/orgs","repos_url":"https://api.github.com/users/silverwind/repos","events_url":"https://api.github.com/users/silverwind/events{/privacy}","received_events_url":"https://api.github.com/users/silverwind/received_events","type":"User","site_admin":false}],"milestone":null,"comments":18,"created_at":"2016-12-15T21:33:47Z","updated_at":"2016-12-26T07:09:43Z","closed_at":null,"body":"The Chromium console supports format specifiers: https://developers.google.com/web/tools/chrome-devtools/console/console-write#string_substitution_and_formatting\r\n\r\nIn particular, both `%i` and `%d` specify an integral argument.  Node.js does not perform the conversion for `%i`:\r\n\r\n```\r\n/* node.js */\r\n> console.log(\"%i\", 1234)\r\n%i 1234\r\n/* google chrome */\r\n> console.log(\"%i\", 1234)\r\n1234\r\n```\r\n\r\nI think the fix is really simple: the relevant code is at https://github.com/nodejs/node/blob/master/lib/util.js#L86-L117 .  Just adding the `i` case should be enough:\r\n\r\n```\r\n      switch (f.charCodeAt(i + 1)) {\r\n        case 105: // 'i' <-- this is the new line, and it should appear just before the `d` case to make the fall through work\r\n        case 100: // 'd'\r\n```\r\n\r\nIf it makes sense I can send a PR"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/269174424","html_url":"https://github.com/nodejs/node/issues/10292#issuecomment-269174424","issue_url":"https://api.github.com/repos/nodejs/node/issues/10292","id":269174424,"user":{"login":"TheAlphaNerd","id":498775,"avatar_url":"https://avatars.githubusercontent.com/u/498775?v=3","gravatar_id":"","url":"https://api.github.com/users/TheAlphaNerd","html_url":"https://github.com/TheAlphaNerd","followers_url":"https://api.github.com/users/TheAlphaNerd/followers","following_url":"https://api.github.com/users/TheAlphaNerd/following{/other_user}","gists_url":"https://api.github.com/users/TheAlphaNerd/gists{/gist_id}","starred_url":"https://api.github.com/users/TheAlphaNerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheAlphaNerd/subscriptions","organizations_url":"https://api.github.com/users/TheAlphaNerd/orgs","repos_url":"https://api.github.com/users/TheAlphaNerd/repos","events_url":"https://api.github.com/users/TheAlphaNerd/events{/privacy}","received_events_url":"https://api.github.com/users/TheAlphaNerd/received_events","type":"User","site_admin":false},"created_at":"2016-12-26T07:09:43Z","updated_at":"2016-12-26T07:09:43Z","body":"I'm very interested in seeing how node can get closer to the what-wg spec, and in what ways we can help to eliminate ambiguity. Thanks for bringing this up @jsinmotion and for chiming in @terinjokes."}}
{"actor":{"display_login":"TheAlphaNerd"}}