{"action":"created","issue":{"url":"https://api.github.com/repos/alexei/sprintf.js/issues/53","repository_url":"https://api.github.com/repos/alexei/sprintf.js","labels_url":"https://api.github.com/repos/alexei/sprintf.js/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/alexei/sprintf.js/issues/53/comments","events_url":"https://api.github.com/repos/alexei/sprintf.js/issues/53/events","html_url":"https://github.com/alexei/sprintf.js/issues/53","id":53840573,"number":53,"title":"does't work in browser","user":{"login":"chovy","id":27381,"avatar_url":"https://avatars.githubusercontent.com/u/27381?v=3","gravatar_id":"","url":"https://api.github.com/users/chovy","html_url":"https://github.com/chovy","followers_url":"https://api.github.com/users/chovy/followers","following_url":"https://api.github.com/users/chovy/following{/other_user}","gists_url":"https://api.github.com/users/chovy/gists{/gist_id}","starred_url":"https://api.github.com/users/chovy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chovy/subscriptions","organizations_url":"https://api.github.com/users/chovy/orgs","repos_url":"https://api.github.com/users/chovy/repos","events_url":"https://api.github.com/users/chovy/events{/privacy}","received_events_url":"https://api.github.com/users/chovy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2015-01-09T07:17:52Z","updated_at":"2016-12-16T16:44:04Z","closed_at":null,"body":"``Anonymous AMD module used, but it was not included as a dependency`\n"},"comment":{"url":"https://api.github.com/repos/alexei/sprintf.js/issues/comments/267637240","html_url":"https://github.com/alexei/sprintf.js/issues/53#issuecomment-267637240","issue_url":"https://api.github.com/repos/alexei/sprintf.js/issues/53","id":267637240,"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},"created_at":"2016-12-16T16:44:04Z","updated_at":"2016-12-16T16:44:04Z","body":"@alexei right now sprintf-js does not use the `%O` conversion:\r\n\r\n```\r\n> require(\"sprintf-js\").sprintf(\"%O\",[1,2,3])\r\nSyntaxError: [sprintf] unexpected placeholder\r\n```\r\n\r\nSo this is not breaking existing functionality.  This can coexist with the JSON `%j` rendering.  And on a somewhat related note, the WHATWG console spec mentions %O and at first blush the object_stringify function satisfies the requirement:  https://console.spec.whatwg.org/#formatter\r\n\r\nTo answer the question about JSON deficiencies, the biggest problem is with circular structures:\r\n\r\n```js\r\n> var x = {}; x.x = x; x;\r\n{ x: [Circular] } // <-- node knows it's a circular reference\r\n> require(\"sprintf-js\").sprintf(\"%j\", x)\r\nTypeError: Converting circular structure to JSON\r\n    at JSON.stringify (<anonymous>)\r\n    at sprintf.format (/usr/local/lib/node_modules/sprintf-js/src/sprintf.js:73:36)\r\n    at Object.sprintf (/usr/local/lib/node_modules/sprintf-js/src/sprintf.js:21:31)\r\n    at repl:1:23\r\n    at realRunInThisContextScript (vm.js:22:35)\r\n    at sigintHandlersWrap (vm.js:98:12)\r\n    at ContextifyScript.Script.runInThisContext (vm.js:24:12)\r\n    at REPLServer.defaultEval (repl.js:313:29)\r\n    at bound (domain.js:280:14)\r\n    at REPLServer.runBound [as eval] (domain.js:293:12)\r\n> require(\"sprintf\").sprintf(\"%O\", x)\r\n'{x: {x: {x: {x: {x: [Object]}}}}}'\r\n```\r\n\r\nWhether object_stringify is doing the right thing here is up for debate, but it is definitely not blowing up with an error in the same way that JSON does.  Again, not saying one is better than the other, but both can coexist since %O is not currently being used"}}
{"actor":{"display_login":"jsinmotion"}}