{"action":"created","issue":{"url":"https://api.github.com/repos/DerHowie/word-cataloguer/issues/3","repository_url":"https://api.github.com/repos/DerHowie/word-cataloguer","labels_url":"https://api.github.com/repos/DerHowie/word-cataloguer/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/DerHowie/word-cataloguer/issues/3/comments","events_url":"https://api.github.com/repos/DerHowie/word-cataloguer/issues/3/events","html_url":"https://github.com/DerHowie/word-cataloguer/issues/3","id":147207327,"number":3,"title":"add sortBy option","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":1,"created_at":"2016-04-10T08:53:01Z","updated_at":"2016-04-10T23:06:58Z","closed_at":"2016-04-10T23:06:58Z","body":"it would be cool to have the option to get a returned value with the most popular words first:\r\n\r\nIn Descending order:\r\n```js\r\nwordCataloguer('Santa says Yo Yo Yo!', {sortBy:'DESC'});\r\n/*\r\n    'Yo': 3 \r\n    'says': 1 \r\n    'Santa': 1\r\n*/\r\n```\r\n\r\nand in Ascending order:\r\n```js\r\nwordCataloguer('Santa says Yo Yo Yo!', {sortBy:'ASCN'});\r\n/*\r\n    'says': 1\r\n    'Santa': 1\r\n    'Yo': 3\r\n*/\r\n```"},"comment":{"url":"https://api.github.com/repos/DerHowie/word-cataloguer/issues/comments/208088182","html_url":"https://github.com/DerHowie/word-cataloguer/issues/3#issuecomment-208088182","issue_url":"https://api.github.com/repos/DerHowie/word-cataloguer/issues/3","id":208088182,"user":{"login":"DerHowie","id":14877580,"avatar_url":"https://avatars.githubusercontent.com/u/14877580?v=3","gravatar_id":"","url":"https://api.github.com/users/DerHowie","html_url":"https://github.com/DerHowie","followers_url":"https://api.github.com/users/DerHowie/followers","following_url":"https://api.github.com/users/DerHowie/following{/other_user}","gists_url":"https://api.github.com/users/DerHowie/gists{/gist_id}","starred_url":"https://api.github.com/users/DerHowie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DerHowie/subscriptions","organizations_url":"https://api.github.com/users/DerHowie/orgs","repos_url":"https://api.github.com/users/DerHowie/repos","events_url":"https://api.github.com/users/DerHowie/events{/privacy}","received_events_url":"https://api.github.com/users/DerHowie/received_events","type":"User","site_admin":false},"created_at":"2016-04-10T23:06:58Z","updated_at":"2016-04-10T23:06:58Z","body":"I have added an \"order\" option to the module. By default the module now returns objects in descending order and ascending order can be accessed with the following syntax: \r\n\r\n```js\r\nwordCataloguer('Santa says Yo Yo Yo!', {order: 'asc'});\r\n// => [{word: 'Santa', count: 1}, {word: 'says', count: 1}, {word: 'Yo', count: 3}]\r\n```"}}