{"action":"created","issue":{"url":"https://api.github.com/repos/stefanpenner/es6-promise/issues/182","repository_url":"https://api.github.com/repos/stefanpenner/es6-promise","labels_url":"https://api.github.com/repos/stefanpenner/es6-promise/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/stefanpenner/es6-promise/issues/182/comments","events_url":"https://api.github.com/repos/stefanpenner/es6-promise/issues/182/events","html_url":"https://github.com/stefanpenner/es6-promise/issues/182","id":145932446,"number":182,"title":"how to assign results of promise to global scope variable","user":{"login":"vivekbrahmadandi","id":8275032,"avatar_url":"https://avatars.githubusercontent.com/u/8275032?v=3","gravatar_id":"","url":"https://api.github.com/users/vivekbrahmadandi","html_url":"https://github.com/vivekbrahmadandi","followers_url":"https://api.github.com/users/vivekbrahmadandi/followers","following_url":"https://api.github.com/users/vivekbrahmadandi/following{/other_user}","gists_url":"https://api.github.com/users/vivekbrahmadandi/gists{/gist_id}","starred_url":"https://api.github.com/users/vivekbrahmadandi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vivekbrahmadandi/subscriptions","organizations_url":"https://api.github.com/users/vivekbrahmadandi/orgs","repos_url":"https://api.github.com/users/vivekbrahmadandi/repos","events_url":"https://api.github.com/users/vivekbrahmadandi/events{/privacy}","received_events_url":"https://api.github.com/users/vivekbrahmadandi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-05T09:21:24Z","updated_at":"2016-05-17T15:16:24Z","closed_at":"2016-05-17T15:16:24Z","body":"How can we resolve promise to a normal number value .\r\n\r\nI have use case in protractor automation in the first i have to call a asynchronous operation then that result value which should not be a promise .\r\n\r\nI am using protractor framework\r\n\r\n\r\n\r\nvar mobileNumber = database.generateMobileNumber().then(function(mobileNumber){\r\n    done();\r\n    return mobileNumber;\r\n}); \r\nvar number=Promise.resolve(mobileNumber);"},"comment":{"url":"https://api.github.com/repos/stefanpenner/es6-promise/issues/comments/219750721","html_url":"https://github.com/stefanpenner/es6-promise/issues/182#issuecomment-219750721","issue_url":"https://api.github.com/repos/stefanpenner/es6-promise/issues/182","id":219750721,"user":{"login":"stefanpenner","id":1377,"avatar_url":"https://avatars.githubusercontent.com/u/1377?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanpenner","html_url":"https://github.com/stefanpenner","followers_url":"https://api.github.com/users/stefanpenner/followers","following_url":"https://api.github.com/users/stefanpenner/following{/other_user}","gists_url":"https://api.github.com/users/stefanpenner/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanpenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanpenner/subscriptions","organizations_url":"https://api.github.com/users/stefanpenner/orgs","repos_url":"https://api.github.com/users/stefanpenner/repos","events_url":"https://api.github.com/users/stefanpenner/events{/privacy}","received_events_url":"https://api.github.com/users/stefanpenner/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T15:16:23Z","updated_at":"2016-05-17T15:16:23Z","body":"the only way in ES3/ES5 is to invoke `then` on a promise. In the future, async/await will allow what appears to be synchronous access."}}