{"action":"created","issue":{"url":"https://api.github.com/repos/exercism/xecmascript/issues/232","repository_url":"https://api.github.com/repos/exercism/xecmascript","labels_url":"https://api.github.com/repos/exercism/xecmascript/issues/232/labels{/name}","comments_url":"https://api.github.com/repos/exercism/xecmascript/issues/232/comments","events_url":"https://api.github.com/repos/exercism/xecmascript/issues/232/events","html_url":"https://github.com/exercism/xecmascript/pull/232","id":160460933,"number":232,"title":"Wrap the function to test","user":{"login":"yanick","id":19954,"avatar_url":"https://avatars.githubusercontent.com/u/19954?v=3","gravatar_id":"","url":"https://api.github.com/users/yanick","html_url":"https://github.com/yanick","followers_url":"https://api.github.com/users/yanick/followers","following_url":"https://api.github.com/users/yanick/following{/other_user}","gists_url":"https://api.github.com/users/yanick/gists{/gist_id}","starred_url":"https://api.github.com/users/yanick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanick/subscriptions","organizations_url":"https://api.github.com/users/yanick/orgs","repos_url":"https://api.github.com/users/yanick/repos","events_url":"https://api.github.com/users/yanick/events{/privacy}","received_events_url":"https://api.github.com/users/yanick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-15T16:05:23Z","updated_at":"2016-06-27T14:07:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/exercism/xecmascript/pulls/232","html_url":"https://github.com/exercism/xecmascript/pull/232","diff_url":"https://github.com/exercism/xecmascript/pull/232.diff","patch_url":"https://github.com/exercism/xecmascript/pull/232.patch"},"body":"... such that if `buffer` is an object, `this` is set to the proper value when `read` is invoked."},"comment":{"url":"https://api.github.com/repos/exercism/xecmascript/issues/comments/228755883","html_url":"https://github.com/exercism/xecmascript/pull/232#issuecomment-228755883","issue_url":"https://api.github.com/repos/exercism/xecmascript/issues/232","id":228755883,"user":{"login":"yanick","id":19954,"avatar_url":"https://avatars.githubusercontent.com/u/19954?v=3","gravatar_id":"","url":"https://api.github.com/users/yanick","html_url":"https://github.com/yanick","followers_url":"https://api.github.com/users/yanick/followers","following_url":"https://api.github.com/users/yanick/following{/other_user}","gists_url":"https://api.github.com/users/yanick/gists{/gist_id}","starred_url":"https://api.github.com/users/yanick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanick/subscriptions","organizations_url":"https://api.github.com/users/yanick/orgs","repos_url":"https://api.github.com/users/yanick/repos","events_url":"https://api.github.com/users/yanick/events{/privacy}","received_events_url":"https://api.github.com/users/yanick/received_events","type":"User","site_admin":false},"created_at":"2016-06-27T14:07:56Z","updated_at":"2016-06-27T14:07:56Z","body":"The way the interface is presented, one (well, I, at least :-) ) would expect\r\n\r\n```\r\nconst buf1 = circularBuffer(2);\r\n\r\nconst buf2 = circularBuffer(1);\r\n\r\nbuf1.write(1);\r\nbuf1.write(2);\r\n\r\n```\r\n\r\nto work. But it doesn't because the example code uses a singleton (and the test using the un`this`ified function hamstring the uses of encapsulated objects).\r\n\r\nIf, for the exercise, we /really/ want to implement a singleton class, the calls should be less ambiguous:\r\n\r\n```\r\nimport circularBuffer from 'crircularBuffer';\r\n\r\ncircularBuffer.setSize(2);\r\n\r\ncircularBuffer.write(1);\r\n\r\netc, etc, etc\r\n``` "}}
{"actor":{"display_login":"yanick"}}