{"action":"created","issue":{"url":"https://api.github.com/repos/KenPowers/dr-promise/issues/1","labels_url":"https://api.github.com/repos/KenPowers/dr-promise/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/KenPowers/dr-promise/issues/1/comments","events_url":"https://api.github.com/repos/KenPowers/dr-promise/issues/1/events","html_url":"https://github.com/KenPowers/dr-promise/pull/1","id":107496920,"number":1,"title":"Support pre-ES-2015 browsers","user":{"login":"tomekwi","id":4624660,"avatar_url":"https://avatars.githubusercontent.com/u/4624660?v=3","gravatar_id":"","url":"https://api.github.com/users/tomekwi","html_url":"https://github.com/tomekwi","followers_url":"https://api.github.com/users/tomekwi/followers","following_url":"https://api.github.com/users/tomekwi/following{/other_user}","gists_url":"https://api.github.com/users/tomekwi/gists{/gist_id}","starred_url":"https://api.github.com/users/tomekwi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomekwi/subscriptions","organizations_url":"https://api.github.com/users/tomekwi/orgs","repos_url":"https://api.github.com/users/tomekwi/repos","events_url":"https://api.github.com/users/tomekwi/events{/privacy}","received_events_url":"https://api.github.com/users/tomekwi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-09-21T12:06:42Z","updated_at":"2015-09-22T21:21:01Z","closed_at":"2015-09-22T10:39:06Z","pull_request":{"url":"https://api.github.com/repos/KenPowers/dr-promise/pulls/1","html_url":"https://github.com/KenPowers/dr-promise/pull/1","diff_url":"https://github.com/KenPowers/dr-promise/pull/1.diff","patch_url":"https://github.com/KenPowers/dr-promise/pull/1.patch"},"body":"[Not all](http://caniuse.com/#search=promise) commonly-used browsers support promises natively. To get your lib to work in IE I have to install a global shim – which [isn’t a best practice](https://github.com/sindresorhus/object-assign/issues/10#issuecomment-65065859).\r\n\r\nThere are two reasonable options to deal with this:\r\n\r\n- use a non-global shim like *[es6-promise](http://npm.im/es6-promise)*;\r\n- use *[any-promise](http://npm.im/any-promise)* to get any already-installed spec-compliant non-global polyfill.\r\n\r\nI went with the second option."},"comment":{"url":"https://api.github.com/repos/KenPowers/dr-promise/issues/comments/142426287","html_url":"https://github.com/KenPowers/dr-promise/pull/1#issuecomment-142426287","issue_url":"https://api.github.com/repos/KenPowers/dr-promise/issues/1","id":142426287,"user":{"login":"tomekwi","id":4624660,"avatar_url":"https://avatars.githubusercontent.com/u/4624660?v=3","gravatar_id":"","url":"https://api.github.com/users/tomekwi","html_url":"https://github.com/tomekwi","followers_url":"https://api.github.com/users/tomekwi/followers","following_url":"https://api.github.com/users/tomekwi/following{/other_user}","gists_url":"https://api.github.com/users/tomekwi/gists{/gist_id}","starred_url":"https://api.github.com/users/tomekwi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomekwi/subscriptions","organizations_url":"https://api.github.com/users/tomekwi/orgs","repos_url":"https://api.github.com/users/tomekwi/repos","events_url":"https://api.github.com/users/tomekwi/events{/privacy}","received_events_url":"https://api.github.com/users/tomekwi/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T21:21:00Z","updated_at":"2015-09-22T21:21:00Z","body":"> Not necessarily `require(process.env.MY_FAV_PROMISE)`, but something like:\r\n>\r\n>```js\r\nif (process.env.PROMISE_IMPL === 'bluebird') {\r\n  module.exports = require('bluebird');\r\n} else if (process.env.PROMISE_IMPL === 'rsvp') {\r\n  module.exports = require('rsvp');\r\n} // etc\r\n```\r\n\r\n@kevinbeaty @KenPowers AFAIK, this would mean someone bundling the app would have to manually exclude *bluebird*, *rsvp* and all other implementations he doesn’t use. Webpack certainly would require that.\r\n\r\nI guess the *aliasify* option would really be more convenient. Or just using [the `browser` field](https://github.com/substack/browserify-handbook/tree/e21ccd34f63be30baa387fa846874602d6150c08#browser-field) (there is an equivalent in webpack). That can be easily done today, with this PR merged.\r\n\r\nThen all we’d really need is a doc update. @kevinbeaty if it works out I can mention the workflow in a PR to *any-promise* too. 😊"}}