├── .gitignore
├── .npmignore
├── .travis.yml
├── contributing.md
├── dist
├── awaiting.common.js
└── awaiting.umd.js
├── docs
├── api.html
├── assets
│ ├── anchor.js
│ ├── bass-addons.css
│ ├── bass.css
│ ├── fonts
│ │ ├── EOT
│ │ │ ├── SourceCodePro-Bold.eot
│ │ │ └── SourceCodePro-Regular.eot
│ │ ├── LICENSE.txt
│ │ ├── OTF
│ │ │ ├── SourceCodePro-Bold.otf
│ │ │ └── SourceCodePro-Regular.otf
│ │ ├── TTF
│ │ │ ├── SourceCodePro-Bold.ttf
│ │ │ └── SourceCodePro-Regular.ttf
│ │ ├── WOFF
│ │ │ ├── OTF
│ │ │ │ ├── SourceCodePro-Bold.otf.woff
│ │ │ │ └── SourceCodePro-Regular.otf.woff
│ │ │ └── TTF
│ │ │ │ ├── SourceCodePro-Bold.ttf.woff
│ │ │ │ └── SourceCodePro-Regular.ttf.woff
│ │ ├── WOFF2
│ │ │ ├── OTF
│ │ │ │ ├── SourceCodePro-Bold.otf.woff2
│ │ │ │ └── SourceCodePro-Regular.otf.woff2
│ │ │ └── TTF
│ │ │ │ ├── SourceCodePro-Bold.ttf.woff2
│ │ │ │ └── SourceCodePro-Regular.ttf.woff2
│ │ └── source-code-pro.css
│ ├── github.css
│ ├── site.js
│ └── style.css
├── examples
│ ├── awaiting.js
│ ├── awaiting.umd.js
│ └── kittens.html
├── index.html
└── style.css
├── examples
├── awaiting.umd.js
└── kittens.html
├── lib
└── awaiting.js
├── package.json
├── readme.md
├── test
├── awaited.test.js
├── awaiting.test.js
├── browser
│ ├── index.html
│ └── test.js
├── callback.test.js
├── delay.test.js
├── errorlist.test.js
├── failure.test.js
├── fixtures
│ ├── rejection-ignore.js
│ ├── rejection-multiple.js
│ ├── rejection-swallow.js
│ └── rejection-throw.js
├── limit.test.js
├── list.test.js
├── map.test.js
├── node
│ ├── event.test.js
│ └── rejections.test.js
├── object.test.js
├── result.test.js
├── set.test.js
├── single.test.js
├── success.test.js
└── time.test.js
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | *.env
3 | .DS_Store
4 | .nyc_output
5 | coverage
6 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | *.env
3 | .DS_Store
4 | docs
5 | .nyc_output
6 | coverage
7 | examples
8 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "7.6.0"
4 | - "node"
5 | script: yarn test
6 | after_success: yarn coverage
7 |
--------------------------------------------------------------------------------
/contributing.md:
--------------------------------------------------------------------------------
1 | # Contributing to Awaiting
2 |
3 | First, thanks for taking the time to contribute!
4 |
5 | Following this guide will help your bug report, suggestion, or pull request get fixed, implemented, or merged quickly and smoothly.
6 |
7 | ## Bug reports
8 |
9 | Bug reports are filed on [GitHub issues](https://github.com/hunterloftis/awaiting/issues).
10 |
11 | The best bug reports are Pull Requests with new test cases demonstrating the bug. If that's not an option, please provide:
12 |
13 | 1. The Awaiting, node, npm, yarn, and operating system versions you're using.
14 | 2. Short, simple reproduction code.
15 | 3. What you expect to happen.
16 | 4. What actually happens.
17 |
18 | ## Suggestions
19 |
20 | To suggest an enhancement, please open a
21 | [GitHub issue](https://github.com/hunterloftis/awaiting/issues)
22 | titled "Enhancement: your proposal title."
23 |
24 | The best suggestions include code examples of how your feature's
25 | API might look to a user (how will people use this enhancement?).
26 |
27 | Implementation recommendations are fine,
28 | but usually less useful at this early stage -
29 | it's more important to make sure the feature will
30 | provide a pleasant development experience, and then
31 | to sort out the implementation in a Pull Request.
32 |
33 | Other good information to include in a suggestion is how much of the implementation you're capable of / interested in implementing.
34 |
35 | ## Pull Requests
36 |
37 | In order to make the best use of your time,
38 | please start new feature requests as [suggestions](#suggestions) rather than PRs.
39 | That will allow us to discuss the feature and its API - and to settle on a nice design that aligns with project goals and scope - before anyone writes any code.
40 |
41 | Once we've decided that a feature would be useful,
42 | settled on an API,
43 | and discussed implementation details,
44 | your Pull Request will be easy to review and merge.
45 |
46 | Staying in the project's requirements is mostly automated. To start working on Awaiting:
47 |
48 | ```
49 | $ git clone https://github.com/hunterloftis/awaiting.git
50 | $ cd awaiting
51 | $ yarn install
52 | ```
53 |
54 | During development, the test script will ensure you're on spec:
55 |
56 | ```
57 | $ yarn test # lints, runs tests, checks coverage %
58 | ```
59 |
60 | Once you've implemented your fix or feature,
61 | ensure tests are working in the browser and you're at 100% test coverage:
62 |
63 | ```
64 | $ yarn test:browser
65 | $ yarn coverage:report
66 | ```
67 |
68 | Finally, document your code with JSDoc and submit a PR!
69 |
--------------------------------------------------------------------------------
/dist/awaiting.common.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Object.defineProperty(exports, '__esModule', { value: true });
4 |
5 | /**
6 | * The async/await utility for browsers and Node.js.
7 | *
8 | * (
9 | * [examples](https://github.com/hunterloftis/awaiting#examples) -
10 | * [github](https://github.com/hunterloftis/awaiting) -
11 | * [npm](https://www.npmjs.com/package/awaiting) -
12 | * [suggestions / bug reports](https://github.com/hunterloftis/awaiting/issues) -
13 | * [installation](https://github.com/hunterloftis/awaiting#installation) -
14 | * [motivation](https://github.com/hunterloftis/awaiting#motivation)
15 | * )
16 | *
17 | * **`$ yarn add awaiting`**
18 | *
19 | * **`$ npm install awaiting --save`**
20 | *
21 | * **`
1234 |
1235 |