.. | ||
CHANGELOG.md | ||
es6-promise.auto.js | ||
es6-promise.auto.min.js | ||
es6-promise.js | ||
es6-promise.min.js | ||
LICENSE.htm | ||
README.md |
<link crossorigin="anonymous" media="all" integrity="sha512-x5em3k3cLtKDuSW05XSADtIDd37AgOlh57A7jj+7JJRw7ayMd7kPGhtX1HjTHhTpGAI6UsKhudSzInZCbqgpUw==" rel="stylesheet" href="https://github.githubassets.com/assets/github-e2a243a35456e8165ff97336d8161f5e.css" />
<meta name="twitter:image:src" content="https://avatars1.githubusercontent.com/u/1377?s=400&v=4" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary" /><meta name="twitter:title" content="stefanpenner/es6-promise" /><meta name="twitter:description" content="A polyfill for ES6-style Promises. Contribute to stefanpenner/es6-promise development by creating an account on GitHub." />
<meta property="og:image" content="https://avatars1.githubusercontent.com/u/1377?s=400&v=4" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="stefanpenner/es6-promise" /><meta property="og:url" content="https://github.com/stefanpenner/es6-promise" /><meta property="og:description" content="A polyfill for ES6-style Promises. Contribute to stefanpenner/es6-promise development by creating an account on GitHub." />
<meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
<meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc">
<meta name="google-analytics" content="UA-3769691-2">
<meta name="hostname" content="github.com">
<meta name="user-login" content="JuliaRadzhabova">
<meta name="expected-hostname" content="github.com">
<meta name="js-proxy-site-detection-payload" content="ZTcyMjVlZWI3OWZjNTZkNDU4MDJmMjk3N2QzODNkMDdiYzc2MmYyZjM1Y2E1NTI2ZTZlZTMwNGU1OGJhZGM0Znx7InJlbW90ZV9hZGRyZXNzIjoiOTUuNzkuNTkuMjAyIiwicmVxdWVzdF9pZCI6IkU0RDc6MjYyRTU6NUM5ODJFRDo4RTY1MkNFOjVEODIwMUY4IiwidGltZXN0YW1wIjoxNTY4ODAxMjc4LCJob3N0IjoiZ2l0aHViLmNvbSJ9">
<meta name="enabled-features" content="ACTIONS_V2_ON_MARKETPLACE,MARKETPLACE_FEATURED_BLOG_POSTS,MARKETPLACE_INVOICED_BILLING,MARKETPLACE_SOCIAL_PROOF_CUSTOMERS,MARKETPLACE_TRENDING_SOCIAL_PROOF,MARKETPLACE_RECOMMENDATIONS,MARKETPLACE_PENDING_INSTALLATIONS,NOTIFY_ON_BLOCK,RELATED_ISSUES,GHE_CLOUD_TRIAL">
<link href="https://github.com/stefanpenner/es6-promise/commits/master.atom" rel="alternate" title="Recent Commits to es6-promise:master" type="application/atom+xml">
<link rel="canonical" href="https://github.com/stefanpenner/es6-promise/blob/master/README.md" data-pjax-transient>
</head>
<header class="Header js-details-container Details flex-wrap flex-lg-nowrap p-responsive" role="banner">
<div class="Header-item d-none d-lg-flex">
<a class="Header-link" href="https://github.com/" data-hotkey="g d" aria-label="Homepage" data-ga-click="Header, go to dashboard, icon:logo">
</div>
<div class="Header-item d-lg-none">
<button class="Header-link btn-link js-details-target" type="button" aria-label="Toggle navigation" aria-expanded="false">
<svg height="24" class="octicon octicon-three-bars" viewBox="0 0 12 16" version="1.1" width="18" aria-hidden="true"><path fill-rule="evenodd" d="M11.41 9H.59C0 9 0 8.59 0 8c0-.59 0-1 .59-1H11.4c.59 0 .59.41.59 1 0 .59 0 1-.59 1h.01zm0-4H.59C0 5 0 4.59 0 4c0-.59 0-1 .59-1H11.4c.59 0 .59.41.59 1 0 .59 0 1-.59 1h.01zM.59 11H11.4c.59 0 .59.41.59 1 0 .59 0 1-.59 1H.59C0 13 0 12.59 0 12c0-.59 0-1 .59-1z"/></svg>
</button>
</div>
<div class="Header-item Header-item--full flex-column flex-lg-row width-full flex-order-2 flex-lg-order-none mr-0 mr-lg-3 mt-3 mt-lg-0 Details-content--hidden">
<div class="header-search flex-self-stretch flex-lg-self-auto mr-0 mr-lg-3 mb-3 mb-lg-0 scoped-search site-scoped-search js-site-search position-relative js-jump-to"
role="combobox" aria-owns="jump-to-results" aria-label="Search or jump to" aria-haspopup="listbox" aria-expanded="false"
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
- No suggested jump to results
-
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28"> <div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div> <div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search"> <span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository"> In this repository </span> <span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub"> All GitHub </span> <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span> </div> <div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span class="d-inline-block ml-1 v-align-middle">↵</span> </div>
-
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28"> <div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div> <div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search"> <span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository"> In this repository </span> <span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub"> All GitHub </span> <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span> </div> <div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span class="d-inline-block ml-1 v-align-middle">↵</span> </div>
<li class="d-flex flex-justify-center flex-items-center p-0 f5 js-jump-to-suggestion">
<img src="https://github.githubassets.com/images/spinners/octocat-spinner-128.gif" alt="Octocat Spinner Icon" class="m-2" width="28">
</li>
</div>
</label>
<nav class="d-flex flex-column flex-lg-row flex-self-stretch flex-lg-self-auto" aria-label="Global">
<a class="Header-link d-block d-lg-none py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" data-ga-click="Header, click, Nav menu - item:dashboard:user" aria-label="Dashboard" href="/dashboard">
Dashboard
Pull requests
Issues
</div>
Explore
<a class="Header-link d-block d-lg-none mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" href="https://github.com/JuliaRadzhabova">
<img class="avatar" height="20" width="20" alt="@JuliaRadzhabova" src="https://avatars3.githubusercontent.com/u/17922480?s=60&v=4" />
JuliaRadzhabova
</div>
<div class="Header-item Header-item--full flex-justify-center d-lg-none position-relative">
<div class="css-truncate css-truncate-target width-fit position-absolute left-0 right-0 text-center">
<svg class="octicon octicon-repo" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg>
<a class="Header-link" href="/stefanpenner">stefanpenner</a>
/
<a class="Header-link" href="/stefanpenner/es6-promise">es6-promise</a>
<div class="Header-item mr-0 mr-lg-3 flex-order-1 flex-lg-order-none">
<a aria-label="You have no unread notifications" class="Header-link notification-indicator position-relative tooltipped tooltipped-s js-socket-channel js-notification-indicator" data-hotkey="g n" data-ga-click="Header, go to notifications, icon:read" data-channel="notification-changed:17922480" href="/notifications">
<span class="mail-status "></span>
<svg class="octicon octicon-bell" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M14 12v1H0v-1l.73-.58c.77-.77.81-2.55 1.19-4.42C2.69 3.23 6 2 6 2c0-.55.45-1 1-1s1 .45 1 1c0 0 3.39 1.23 4.16 5 .38 1.88.42 3.66 1.19 4.42l.66.58H14zm-7 4c1.11 0 2-.89 2-2H5c0 1.11.89 2 2 2z"/></svg>
<div class="Header-item position-relative d-none d-lg-flex">
<details class="details-overlay details-reset">
</div>
<div class="Header-item position-relative mr-0 d-none d-lg-flex">
<div class="pl-3 pr-3 f6 user-status-container js-user-status-context pb-1" data-url="/users/status?compact=1&link_mentions=0&truncate=1">
Clear status
Never
<ul class="dropdown-menu dropdown-menu-se pl-0 overflow-auto" style="width: 220px; max-height: 15.5em">
<li>
<button type="button" class="btn-link dropdown-item js-user-status-expire-button ws-normal" title="Never">
<span class="d-inline-block text-bold mb-1">Never</span>
<div class="f6 lh-condensed">Keep this status until you clear your status or edit your status.</div>
</button>
</li>
<li class="dropdown-divider" role="none"></li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 30 minutes" value="2019-09-18T13:37:58+03:00">
in 30 minutes
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 1 hour" value="2019-09-18T14:07:58+03:00">
in 1 hour
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 4 hours" value="2019-09-18T17:07:58+03:00">
in 4 hours
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="today" value="2019-09-18T23:59:59+03:00">
today
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="this week" value="2019-09-22T23:59:59+03:00">
this week
</button>
</li>
</ul>
<include-fragment class="js-user-status-org-picker" data-url="/users/status/organizations"></include-fragment>
</div>
<div class="d-flex flex-items-center flex-justify-between p-3 border-top">
<button type="submit" disabled class="width-full btn btn-primary mr-2 js-user-status-submit">
Set status
</button>
<button type="button" disabled class="width-full js-clear-user-status-button btn ml-2 ">
Clear status
</button>
</div>
Never
<ul class="dropdown-menu dropdown-menu-se pl-0 overflow-auto" style="width: 220px; max-height: 15.5em">
<li>
<button type="button" class="btn-link dropdown-item js-user-status-expire-button ws-normal" title="Never">
<span class="d-inline-block text-bold mb-1">Never</span>
<div class="f6 lh-condensed">Keep this status until you clear your status or edit your status.</div>
</button>
</li>
<li class="dropdown-divider" role="none"></li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 30 minutes" value="2019-09-18T13:37:58+03:00">
in 30 minutes
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 1 hour" value="2019-09-18T14:07:58+03:00">
in 1 hour
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 4 hours" value="2019-09-18T17:07:58+03:00">
in 4 hours
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="today" value="2019-09-18T23:59:59+03:00">
today
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="this week" value="2019-09-22T23:59:59+03:00">
this week
</button>
</li>
</ul>
<include-fragment class="js-user-status-org-picker" data-url="/users/status/organizations"></include-fragment>
</div>
<div class="d-flex flex-items-center flex-justify-between p-3 border-top">
<button type="submit" disabled class="width-full btn btn-primary mr-2 js-user-status-submit">
Set status
</button>
<button type="button" disabled class="width-full js-clear-user-status-button btn ml-2 ">
Clear status
</button>
</div>
</div>
<div role="none" class="dropdown-divider"></div>
<a role="menuitem" class="dropdown-item" href="/JuliaRadzhabova" data-ga-click="Header, go to profile, text:your profile">Your profile</a>
<a role="menuitem" class="dropdown-item" href="/JuliaRadzhabova?tab=repositories" data-ga-click="Header, go to repositories, text:your repositories">Your repositories</a>
<a role="menuitem" class="dropdown-item" href="/JuliaRadzhabova?tab=projects" data-ga-click="Header, go to projects, text:your projects">Your projects</a>
<a role="menuitem" class="dropdown-item" href="/JuliaRadzhabova?tab=stars" data-ga-click="Header, go to starred repos, text:your stars">Your stars</a>
<a role="menuitem" class="dropdown-item" href="https://gist.github.com/mine" data-ga-click="Header, your gists, text:your gists">Your gists</a>
<div role="none" class="dropdown-divider"></div>
<a role="menuitem" class="dropdown-item" href="https://help.github.com" data-ga-click="Header, go to help, text:help">Help</a>
<a role="menuitem" class="dropdown-item" href="/settings/profile" data-ga-click="Header, go to settings, icon:settings">Settings</a>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="logout-form" action="/logout" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="JGCYGzkAnjUA98WkHHWwTYMy+N0Qp/2+lL42sJ5X1KYNdwqx9Eajh0+PPR+TlDewmu6GGVTV1j5b0iJjmt3I8w==" />
<button type="submit" class="dropdown-item dropdown-signout" data-ga-click="Header, sign out, icon:logout" role="menuitem">
Sign out
</button>
</div>
<div id="js-flash-container">
<ul class="pagehead-actions">
<li >
<details class="dropdown details-reset details-overlay d-inline-block float-left"
data-deferred-details-content-url="/stefanpenner/es6-promise/used_by_contents"
>
<summary class="btn btn-sm btn-with-count" data-menu-button>
<svg class="octicon octicon-package v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1 4.27v7.47c0 .45.3.84.75.97l6.5 1.73c.16.05.34.05.5 0l6.5-1.73c.45-.13.75-.52.75-.97V4.27c0-.45-.3-.84-.75-.97l-6.5-1.74a1.4 1.4 0 0 0-.5 0L1.75 3.3c-.45.13-.75.52-.75.97zm7 9.09l-6-1.59V5l6 1.61v6.75zM2 4l2.5-.67L11 5.06l-2.5.67L2 4zm13 7.77l-6 1.59V6.61l2-.55V8.5l2-.53V5.53L15 5v6.77zm-2-7.24L6.5 2.8l2-.53L15 4l-2 .53z"/></svg>
Used by
<div class="dropdown-caret"></div>
</summary>
<include-fragment>
<div class="dropdown-menu dropdown-menu-s p-3 text-center" style="width:360px;">
<img width="32" height="32" alt="Loading..." class="my-0" src="https://github.githubassets.com/images/spinners/octocat-spinner-64.gif" />
<p class="pt-1 m-0 f5 text-gray-light">
Loading dependents...
</p>
</div>
</include-fragment>
</details>
<a class="social-count"
href="/stefanpenner/es6-promise/network/dependents?package_id=UGFja2FnZS0xMzgxNzQyMQ%3D%3D"
aria-label="1505605 repositories depend on this package"
>
1,505,605
</a>
</li>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form data-remote="true" class="clearfix js-social-form js-social-container" action="/notifications/subscribe" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="crssYfydwvsnBT4XsNPpIF9hTHdSZ58ToAjPW5IiycsoEZkkIjL2wRpjj1JZ5kxtCp2d0s+iwNC0kaW8DRGNng==" /> <input type="hidden" name="repository_id" value="15046172">
<details class="details-reset details-overlay select-menu float-left">
<summary class="select-menu-button float-left btn btn-sm btn-with-count" data-hydro-click="{"event_type":"repository.click","payload":{"target":"WATCH_BUTTON","repository_id":15046172,"client_id":"1535261555.1544022248","originating_request_id":"E4D7:262E5:5C982ED:8E652CE:5D8201F8","originating_url":"https://github.com/stefanpenner/es6-promise/blob/master/README.md","referrer":"https://github.com/stefanpenner/es6-promise","user_id":17922480}}" data-hydro-click-hmac="eb2c712fc2399fde70447eedcc1023326d7ee6760aaed93cd53a9822acdcee85" data-ga-click="Repository, click Watch settings, action:blob#show"> <span data-menu-button>
<svg class="octicon octicon-eye v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
Watch
</span>
<button type="submit" name="do" value="release_only" class="select-menu-item width-full" aria-checked="false" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Releases only</span>
<span class="description">Be notified of new releases, and when participating or @mentioned.</span>
<span class="hidden-select-button-text" data-menu-button-contents>
<svg class="octicon octicon-eye v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
Unwatch releases
</span>
</div>
</button>
<button type="submit" name="do" value="subscribed" class="select-menu-item width-full" aria-checked="false" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Watching</span>
<span class="description">Be notified of all conversations.</span>
<span class="hidden-select-button-text" data-menu-button-contents>
<svg class="octicon octicon-eye v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
Unwatch
</span>
</div>
</button>
<button type="submit" name="do" value="ignore" class="select-menu-item width-full" aria-checked="false" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Ignoring</span>
<span class="description">Never be notified.</span>
<span class="hidden-select-button-text" data-menu-button-contents>
<svg class="octicon octicon-mute v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 2.81v10.38c0 .67-.81 1-1.28.53L3 10H1c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1h2l3.72-3.72C7.19 1.81 8 2.14 8 2.81zm7.53 3.22l-1.06-1.06-1.97 1.97-1.97-1.97-1.06 1.06L11.44 8 9.47 9.97l1.06 1.06 1.97-1.97 1.97 1.97 1.06-1.06L13.56 8l1.97-1.97z"/></svg>
Stop ignoring
</span>
</div>
</button>
</div>
</details-menu>
</details>
<a class="social-count js-social-count"
href="/stefanpenner/es6-promise/watchers"
aria-label="138 users are watching this repository">
138
</a>
<a href="/stefanpenner/es6-promise/network/members" class="social-count"
aria-label="557 users forked this repository">
557
</a>
<h1 class="public ">
<svg class="octicon octicon-repo" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg>
</div>
Code
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" data-hotkey="g i" class="js-selected-navigation-item reponav-item" data-selected-links="repo_issues repo_labels repo_milestones /stefanpenner/es6-promise/issues" href="/stefanpenner/es6-promise/issues">
<svg class="octicon octicon-issue-opened" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"/></svg>
<span itemprop="name">Issues</span>
<span class="Counter">21</span>
<meta itemprop="position" content="2">
Pull requests 4
<a data-hotkey="g b" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /stefanpenner/es6-promise/projects" href="/stefanpenner/es6-promise/projects">
<svg class="octicon octicon-project" viewBox="0 0 15 16" version="1.1" width="15" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
Projects
<span class="Counter" >0</span>
<a class="js-selected-navigation-item reponav-item" data-hotkey="g w" data-selected-links="repo_wiki /stefanpenner/es6-promise/wiki" href="/stefanpenner/es6-promise/wiki">
<svg class="octicon octicon-book" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"/></svg>
Wiki
Security
Insights
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a class="js-selected-navigation-item selected reponav-item" itemprop="url" aria-current="page" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages /stefanpenner/es6-promise" href="/stefanpenner/es6-promise">
<span itemprop="name">Code</span>
<meta itemprop="position" content="1">
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_issues repo_labels repo_milestones /stefanpenner/es6-promise/issues" href="/stefanpenner/es6-promise/issues">
<span itemprop="name">Issues</span>
<span class="Counter">21</span>
<meta itemprop="position" content="2">
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_pulls checks /stefanpenner/es6-promise/pulls" href="/stefanpenner/es6-promise/pulls">
<span itemprop="name">Pull requests</span>
<span class="Counter">4</span>
<meta itemprop="position" content="3">
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /stefanpenner/es6-promise/projects" href="/stefanpenner/es6-promise/projects">
<span itemprop="name">Projects</span>
<span class="Counter">0</span>
<meta itemprop="position" content="4">
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_wiki /stefanpenner/es6-promise/wiki" href="/stefanpenner/es6-promise/wiki">
<span itemprop="name">Wiki</span>
<meta itemprop="position" content="5">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="security alerts policy code_scanning /stefanpenner/es6-promise/security/advisories" href="/stefanpenner/es6-promise/security/advisories">
<span itemprop="name">Security</span>
<meta itemprop="position" content="6">
Pulse
Community
<a class="d-none js-permalink-shortcut" data-hotkey="y" href="/stefanpenner/es6-promise/blob/f97e2666e6928745c450752e74213d2438b48b4c/README.md">Permalink</a>
<!-- blob contrib key: blob_contributors:v21:b16b1d710ecc99a2cdd489e6882b1830 -->
<div class="d-flex flex-items-start flex-shrink-0 pb-3 flex-column flex-md-row">
<span class="d-flex flex-justify-between width-full width-md-auto">
<div class="BtnGroup flex-shrink-0 d-md-none">
<a href="/stefanpenner/es6-promise/find/master"
class="js-pjax-capture-input btn btn-sm BtnGroup-item"
data-pjax
data-hotkey="t">
Find file
</a>
<clipboard-copy value="README.md" class="btn btn-sm BtnGroup-item">
Copy path
</clipboard-copy>
</div>
</span>
<h2 id="blob-path" class="breadcrumb flex-auto min-width-0 text-normal flex-md-self-center ml-md-2 mr-md-3 my-2 my-md-0">
<span class="js-repo-root text-bold"><span class="js-path-segment"><a data-pjax="true" href="/stefanpenner/es6-promise"><span>es6-promise</span></a></span></span><span class="separator">/</span><strong class="final-path">README.md</strong>
</h2>
<div class="BtnGroup flex-shrink-0 d-none d-md-inline-block">
<a href="/stefanpenner/es6-promise/find/master"
class="js-pjax-capture-input btn btn-sm BtnGroup-item"
data-pjax
data-hotkey="t">
Find file
</a>
<clipboard-copy value="README.md" class="btn btn-sm BtnGroup-item">
Copy path
</clipboard-copy>
</div>
</div>
<div class="Box-body d-flex flex-items-center flex-auto f6 border-bottom-0 flex-wrap" >
<details class="details-reset details-overlay details-overlay-dark lh-default text-gray-dark float-left mr-2" id="blob_contributors_box">
<summary class="btn-link">
<span><strong>31</strong> contributors</span>
</summary>
<details-dialog
class="Box Box--overlay d-flex flex-column anim-fade-in fast"
aria-label="Users who have contributed to this file"
src="/stefanpenner/es6-promise/contributors/master/README.md/list" preload>
<div class="Box-header">
<button class="Box-btn-octicon btn-octicon float-right" type="button" aria-label="Close dialog" data-close-dialog>
<svg class="octicon octicon-x" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg>
</button>
<h3 class="Box-title">
Users who have contributed to this file
</h3>
</div>
<include-fragment class="octocat-spinner my-3" aria-label="Loading..."></include-fragment>
</details-dialog>
</details>
<span class="">
<a class="avatar-link" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=1377" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/stefanpenner/es6-promise/commits/master/README.md?author=stefanpenner">
<img class="avatar mr-1" src="https://avatars3.githubusercontent.com/u/1377?s=40&v=4" width="20" height="20" alt="@stefanpenner" />
</div>
<div class="Box mt-3 position-relative">
<div class="BtnGroup">
<a id="raw-url" class="btn btn-sm BtnGroup-item" href="/stefanpenner/es6-promise/raw/master/README.md">Raw</a>
<a class="btn btn-sm js-update-url-with-hash BtnGroup-item" data-hotkey="b" href="/stefanpenner/es6-promise/blame/master/README.md">Blame</a>
<a rel="nofollow" class="btn btn-sm BtnGroup-item" href="/stefanpenner/es6-promise/commits/master/README.md">History</a>
</div>
<div>
<a class="btn-octicon tooltipped tooltipped-nw hide-sm"
href="https://desktop.github.com"
aria-label="Open this file in GitHub Desktop"
data-ga-click="Repository, open with desktop, type:windows">
<svg class="octicon octicon-device-desktop" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M15 2H1c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h5.34c-.25.61-.86 1.39-2.34 2h8c-1.48-.61-2.09-1.39-2.34-2H15c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm0 9H1V3h14v8z"/></svg>
</a>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="inline-form js-update-url-with-hash" action="/stefanpenner/es6-promise/edit/master/README.md" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="SSEUqu3LXHPBoHtFLi35X5IuqV2mE6fCTV2MBMvnR6CozQhlD0A6RNKYYoAIbHBozIXrmH/MB5hPq1LzyAjWsA==" />
<button class="btn-octicon tooltipped tooltipped-nw" type="submit"
aria-label="Fork this project and edit the file" data-hotkey="e" data-disable-with>
<svg class="octicon octicon-pencil" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M0 12v3h3l8-8-3-3-8 8zm3 2H1v-2h1v1h1v1zm10.3-9.3L12 6 9 3l1.3-1.3a.996.996 0 0 1 1.41 0l1.59 1.59c.39.39.39 1.02 0 1.41z"/></svg>
</button>
rsvp.js) 
ES6-Promise (subset of This is a polyfill of the ES6 Promise. The implementation is a subset of rsvp.js extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the full library.
For API details and how to use promises, see the JavaScript Promises HTML5Rocks article.
Downloads
- es6-promise 27.86 KB (7.33 KB gzipped)
- es6-promise-auto 27.78 KB (7.3 KB gzipped) - Automatically provides/replaces
Promise
if missing or broken. - es6-promise-min 6.17 KB (2.4 KB gzipped)
- es6-promise-auto-min 6.19 KB (2.4 KB gzipped) - Minified version of
es6-promise-auto
above.
CDN
To use via a CDN include this in your html:
<!-- Automatically provides/replaces `Promise` if missing or broken. --> <script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.js"></script> <script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.js"></script><!-- Minified version of
es6-promise-auto
below. --> <script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js"></script>
Node.js
To install:
yarn add es6-promise
or
npm install es6-promise
To use:
var Promise = require('es6-promise').Promise;
Usage in IE<9
catch
and finally
are reserved keywords in IE<9, meaning
promise.catch(func)
or promise.finally(func)
throw a syntax error. To work
around this, you can use a string to access the property as shown in the
following example.
However most minifiers will automatically fix this for you, making the resulting code safe for old browsers and production:
promise['catch'](function(err) { // ... });
promise['finally'](function() { // ... });
Auto-polyfill
To polyfill the global environment (either in Node or in the browser via CommonJS) use the following code snippet:
require('es6-promise').polyfill();
Alternatively
require('es6-promise/auto');
Notice that we don't assign the result of polyfill()
to any variable. The polyfill()
method will patch the global environment (in this case to the Promise
name) when called.
Building & Testing
You will need to have PhantomJS installed globally in order to run the tests.
npm install -g phantomjs
npm run build
to buildnpm test
to run testsnpm start
to run a build watcher, and webserver to testnpm run test:server
for a testem test runner and watching builder
</div>
</main>
<a aria-label="Homepage" title="GitHub" class="footer-octicon d-none d-lg-block mx-lg-4" href="https://github.com">
<svg height="24" class="octicon octicon-mark-github" viewBox="0 0 16 16" version="1.1" width="24" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
</ul>
<script crossorigin="anonymous" integrity="sha512-m54/Q0RDvkA0Z3bkkbO55vf+r7L//dPjDEoQIDA0B2noQJJsIVu5Q73bxfRepW362sPWuRaGKTO8qTX+qWxSbQ==" type="application/javascript" src="https://github.githubassets.com/assets/frameworks-68bc4dba.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-H9MEkjsnun1108zSyZllXSAPfKNKcZBFUq9Y1eM7PxQvwkoHHIj88zfZYRPm6DNFikXaIx2zfaDwUAjqdLxjJQ==" type="application/javascript" src="https://github.githubassets.com/assets/github-bootstrap-3709a75a.js"></script>