{"action":"created","issue":{"url":"https://api.github.com/repos/miguelmota/commafy/issues/2","repository_url":"https://api.github.com/repos/miguelmota/commafy","labels_url":"https://api.github.com/repos/miguelmota/commafy/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/miguelmota/commafy/issues/2/comments","events_url":"https://api.github.com/repos/miguelmota/commafy/issues/2/events","html_url":"https://github.com/miguelmota/commafy/issues/2","id":131840647,"number":2,"title":"attempts to commafy non-numeric strings and objects","user":{"login":"radiovisual","id":5614571,"avatar_url":"https://avatars.githubusercontent.com/u/5614571?v=3","gravatar_id":"","url":"https://api.github.com/users/radiovisual","html_url":"https://github.com/radiovisual","followers_url":"https://api.github.com/users/radiovisual/followers","following_url":"https://api.github.com/users/radiovisual/following{/other_user}","gists_url":"https://api.github.com/users/radiovisual/gists{/gist_id}","starred_url":"https://api.github.com/users/radiovisual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radiovisual/subscriptions","organizations_url":"https://api.github.com/users/radiovisual/orgs","repos_url":"https://api.github.com/users/radiovisual/repos","events_url":"https://api.github.com/users/radiovisual/events{/privacy}","received_events_url":"https://api.github.com/users/radiovisual/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-06T10:06:15Z","updated_at":"2016-02-11T18:04:13Z","closed_at":"2016-02-11T08:24:52Z","body":"Only valid numeric strings should be 'commafied', yet commafy will attempt to commafy non-numeric strings:\r\n\r\n```js\r\ncommafy('123456789abcdefg123');\r\n//=> \"123,456,789abcdefg,123\"\r\n```\r\n\r\n```js\r\ncommafy('abc123def');\r\n//=> \"\"abc,123def\"\"\r\n```\r\n\r\nYou can even take this further: commafy will also attempt to commafy anything you pass it:\r\n\r\n```js\r\n// accepts an object\r\ncommafy({one:1234});\r\n//=> \"[object Object]\"\r\n\r\n// accepts an array\r\ncommafy([1234,5678]);\r\n//=> \"1,234,5,678\"\r\n\r\n// accepts a boolean\r\ncommafy(true);\r\n//=> \"true\"\r\n\r\n// accepts a date\r\ncommafy(new Date());\r\n//=> \"Sat Feb 06 2,016 10:20:32 GMT+0,000 (GMT)\"\r\n```\r\n\r\nIt would be useful if commafy complained if you passed it something that isn't numeric or commafy-able to help catch bugs in the application that is running commafy. \r\n"},"comment":{"url":"https://api.github.com/repos/miguelmota/commafy/issues/comments/182981656","html_url":"https://github.com/miguelmota/commafy/issues/2#issuecomment-182981656","issue_url":"https://api.github.com/repos/miguelmota/commafy/issues/2","id":182981656,"user":{"login":"radiovisual","id":5614571,"avatar_url":"https://avatars.githubusercontent.com/u/5614571?v=3","gravatar_id":"","url":"https://api.github.com/users/radiovisual","html_url":"https://github.com/radiovisual","followers_url":"https://api.github.com/users/radiovisual/followers","following_url":"https://api.github.com/users/radiovisual/following{/other_user}","gists_url":"https://api.github.com/users/radiovisual/gists{/gist_id}","starred_url":"https://api.github.com/users/radiovisual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radiovisual/subscriptions","organizations_url":"https://api.github.com/users/radiovisual/orgs","repos_url":"https://api.github.com/users/radiovisual/repos","events_url":"https://api.github.com/users/radiovisual/events{/privacy}","received_events_url":"https://api.github.com/users/radiovisual/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T18:04:13Z","updated_at":"2016-02-11T18:04:13Z","body":"no problem! happy to help! :+1: "}}