{"action":"created","issue":{"url":"https://api.github.com/repos/dhowe/RiTa/issues/360","repository_url":"https://api.github.com/repos/dhowe/RiTa","labels_url":"https://api.github.com/repos/dhowe/RiTa/issues/360/labels{/name}","comments_url":"https://api.github.com/repos/dhowe/RiTa/issues/360/comments","events_url":"https://api.github.com/repos/dhowe/RiTa/issues/360/events","html_url":"https://github.com/dhowe/RiTa/issues/360","id":180807854,"number":360,"title":"API change for RiTaJS","user":{"login":"dhowe","id":737638,"avatar_url":"https://avatars0.githubusercontent.com/u/737638?v=3","gravatar_id":"","url":"https://api.github.com/users/dhowe","html_url":"https://github.com/dhowe","followers_url":"https://api.github.com/users/dhowe/followers","following_url":"https://api.github.com/users/dhowe/following{/other_user}","gists_url":"https://api.github.com/users/dhowe/gists{/gist_id}","starred_url":"https://api.github.com/users/dhowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhowe/subscriptions","organizations_url":"https://api.github.com/users/dhowe/orgs","repos_url":"https://api.github.com/users/dhowe/repos","events_url":"https://api.github.com/users/dhowe/events{/privacy}","received_events_url":"https://api.github.com/users/dhowe/received_events","type":"User","site_admin":false},"labels":[{"id":89924269,"url":"https://api.github.com/repos/dhowe/RiTa/labels/PRIORITY:%20High","name":"PRIORITY: High","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":{"login":"dhowe","id":737638,"avatar_url":"https://avatars0.githubusercontent.com/u/737638?v=3","gravatar_id":"","url":"https://api.github.com/users/dhowe","html_url":"https://github.com/dhowe","followers_url":"https://api.github.com/users/dhowe/followers","following_url":"https://api.github.com/users/dhowe/following{/other_user}","gists_url":"https://api.github.com/users/dhowe/gists{/gist_id}","starred_url":"https://api.github.com/users/dhowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhowe/subscriptions","organizations_url":"https://api.github.com/users/dhowe/orgs","repos_url":"https://api.github.com/users/dhowe/repos","events_url":"https://api.github.com/users/dhowe/events{/privacy}","received_events_url":"https://api.github.com/users/dhowe/received_events","type":"User","site_admin":false},"assignees":[{"login":"dhowe","id":737638,"avatar_url":"https://avatars0.githubusercontent.com/u/737638?v=3","gravatar_id":"","url":"https://api.github.com/users/dhowe","html_url":"https://github.com/dhowe","followers_url":"https://api.github.com/users/dhowe/followers","following_url":"https://api.github.com/users/dhowe/following{/other_user}","gists_url":"https://api.github.com/users/dhowe/gists{/gist_id}","starred_url":"https://api.github.com/users/dhowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhowe/subscriptions","organizations_url":"https://api.github.com/users/dhowe/orgs","repos_url":"https://api.github.com/users/dhowe/repos","events_url":"https://api.github.com/users/dhowe/events{/privacy}","received_events_url":"https://api.github.com/users/dhowe/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dhowe/RiTa/milestones/5","html_url":"https://github.com/dhowe/RiTa/milestone/5","labels_url":"https://api.github.com/repos/dhowe/RiTa/milestones/5/labels","id":2138286,"number":5,"title":"Version 1.6","description":"- Fix to LTS rules so that they are in sync with dictionary\r\n- Add 1000 word lexicon as default\r\n- Hard fail builds on failed test\r\n- Minor bug fixes","creator":{"login":"dhowe","id":737638,"avatar_url":"https://avatars0.githubusercontent.com/u/737638?v=3","gravatar_id":"","url":"https://api.github.com/users/dhowe","html_url":"https://github.com/dhowe","followers_url":"https://api.github.com/users/dhowe/followers","following_url":"https://api.github.com/users/dhowe/following{/other_user}","gists_url":"https://api.github.com/users/dhowe/gists{/gist_id}","starred_url":"https://api.github.com/users/dhowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhowe/subscriptions","organizations_url":"https://api.github.com/users/dhowe/orgs","repos_url":"https://api.github.com/users/dhowe/repos","events_url":"https://api.github.com/users/dhowe/events{/privacy}","received_events_url":"https://api.github.com/users/dhowe/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":2,"state":"open","created_at":"2016-11-16T04:12:53Z","updated_at":"2017-04-16T06:59:13Z","due_on":"2017-04-23T07:00:00Z","closed_at":null},"comments":2,"created_at":"2016-10-04T05:10:37Z","updated_at":"2017-04-16T07:05:39Z","closed_at":null,"body":"Consider the following example code from the [npm README](https://www.npmjs.com/package/rita):\n\n```\nvar rita = require('rita'),\n  rs = rita.RiString(\"The elephant took a bite!\"),\n  features = rs.features();\n```\n\nOne imagines they would be able to say console.log(rita.VERSION) and get some output. However this is not the case. Instead they would have to write: \n\n```\nconsole.log(rita.RiTa.VERSION);\n```\n\nThis is because the require function returns a wrapper object containing all the rita objects, including RiTa:\n\n```\n{\n   RiTa: {},\n   RiString: {},\n   RiLexicon: {},\n  ...\n}\n```\n\nInstead I propose that the RiTa object itself is returned from require, with the other objects (RiString, RiLexion, etc.) as properties:\n\n```\nRiTa: {\n  RiString: {},\n  RiLexicon: {},\n  ...\n  pluralize(): function() { ... }\n  ...\n}\n```\n\nThis would allow either of the following syntaxes:\n\n```\nvar RiTa = require('rita'),\n  rs = RiTa.RiString(\"The elephant took a bite!\"),\n  version = RiTa.VERSION;\n```\n\n```\nvar RiTa = require('rita'),\n  RiString = RiTa.RiString,\n  rs = new RiString(\"The elephant took a bite!\"),\n  version = RiTa.VERSION;\n```\n\nOf course this would require significant changes in our examples and tests. Thoughts?\n"},"comment":{"url":"https://api.github.com/repos/dhowe/RiTa/issues/comments/294337392","html_url":"https://github.com/dhowe/RiTa/issues/360#issuecomment-294337392","issue_url":"https://api.github.com/repos/dhowe/RiTa/issues/360","id":294337392,"user":{"login":"dhowe","id":737638,"avatar_url":"https://avatars0.githubusercontent.com/u/737638?v=3","gravatar_id":"","url":"https://api.github.com/users/dhowe","html_url":"https://github.com/dhowe","followers_url":"https://api.github.com/users/dhowe/followers","following_url":"https://api.github.com/users/dhowe/following{/other_user}","gists_url":"https://api.github.com/users/dhowe/gists{/gist_id}","starred_url":"https://api.github.com/users/dhowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhowe/subscriptions","organizations_url":"https://api.github.com/users/dhowe/orgs","repos_url":"https://api.github.com/users/dhowe/repos","events_url":"https://api.github.com/users/dhowe/events{/privacy}","received_events_url":"https://api.github.com/users/dhowe/received_events","type":"User","site_admin":false},"created_at":"2017-04-16T07:05:39Z","updated_at":"2017-04-16T07:05:39Z","body":"This is done, and actually only affects npm examples. As best I can tell, there are only 2 cases: tonic.js and README.md for the RiTaJS repo  on github, neither of which are affected. \r\n\r\n@cqx931 any others you can think of? if not, please close"}}
{"actor":{"display_login":"dhowe"}}