{"action":"created","issue":{"url":"https://api.github.com/repos/viljamis/feature.js/issues/4","labels_url":"https://api.github.com/repos/viljamis/feature.js/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/viljamis/feature.js/issues/4/comments","events_url":"https://api.github.com/repos/viljamis/feature.js/issues/4/events","html_url":"https://github.com/viljamis/feature.js/issues/4","id":125801517,"number":4,"title":"Convert properties to lazy getter","user":{"login":"amovah","id":6108180,"avatar_url":"https://avatars.githubusercontent.com/u/6108180?v=3","gravatar_id":"","url":"https://api.github.com/users/amovah","html_url":"https://github.com/amovah","followers_url":"https://api.github.com/users/amovah/followers","following_url":"https://api.github.com/users/amovah/following{/other_user}","gists_url":"https://api.github.com/users/amovah/gists{/gist_id}","starred_url":"https://api.github.com/users/amovah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amovah/subscriptions","organizations_url":"https://api.github.com/users/amovah/orgs","repos_url":"https://api.github.com/users/amovah/repos","events_url":"https://api.github.com/users/amovah/events{/privacy}","received_events_url":"https://api.github.com/users/amovah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2016-01-10T05:41:42Z","updated_at":"2016-01-17T19:50:15Z","closed_at":null,"body":"Hi,\r\n\r\nIt can be faster, feature.js should work as lazy library. every property should be called when I looked it up. not all of them on load time.\r\n\r\nI highly recommend you to read getter in object [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get)\r\n\r\nand I'm interested in fixing this issue.\r\n"},"comment":{"url":"https://api.github.com/repos/viljamis/feature.js/issues/comments/172371407","html_url":"https://github.com/viljamis/feature.js/issues/4#issuecomment-172371407","issue_url":"https://api.github.com/repos/viljamis/feature.js/issues/4","id":172371407,"user":{"login":"amovah","id":6108180,"avatar_url":"https://avatars.githubusercontent.com/u/6108180?v=3","gravatar_id":"","url":"https://api.github.com/users/amovah","html_url":"https://github.com/amovah","followers_url":"https://api.github.com/users/amovah/followers","following_url":"https://api.github.com/users/amovah/following{/other_user}","gists_url":"https://api.github.com/users/amovah/gists{/gist_id}","starred_url":"https://api.github.com/users/amovah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amovah/subscriptions","organizations_url":"https://api.github.com/users/amovah/orgs","repos_url":"https://api.github.com/users/amovah/repos","events_url":"https://api.github.com/users/amovah/events{/privacy}","received_events_url":"https://api.github.com/users/amovah/received_events","type":"User","site_admin":false},"created_at":"2016-01-17T19:50:15Z","updated_at":"2016-01-17T19:50:15Z","body":"@aaalsaleh , as I told we must to change the API. and as I told, our purpose of using getter is increasing load time.\r\n```javascript\r\nif (getterSupported) {\r\n    for (var check in FeatureChecks) {\r\n        if (FeatureChecks.hasOwnProperty(check)) {\r\n            Object.defineProperty(features.prototype, check, {get: FeatureChecks[check]});\r\n        }\r\n    }\r\n}\r\n```\r\nuntil here it might be good idea. but rest of it, it's not good idea. it's against our purpose of using getter or function. it loads whole of checkers in load time.\r\n\r\nConclusion:\r\nif we use getter, some browsers don't support it. if we check that whether browser supports getter, use it, otherwise call functions. **PROBLEM** is here, calling all of them. it's decreasing load time. so we can't use getter and we should don't load all of them in load time. so what should we do?\r\n\r\nin my opinion, using function instead all of them it's better idea. all browser supports and it doesn't execute all of them in load time."}}