https://github.com/nfcampos/await-outside
Await outside of async functions
https://github.com/nfcampos/await-outside
async-await node repl
Last synced: 4 months ago
JSON representation
Await outside of async functions
- Host: GitHub
- URL: https://github.com/nfcampos/await-outside
- Owner: nfcampos
- License: mit
- Created: 2017-03-01T22:18:22.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T21:36:30.000Z (over 2 years ago)
- Last Synced: 2024-12-13T19:11:44.848Z (4 months ago)
- Topics: async-await, node, repl
- Language: JavaScript
- Size: 933 KB
- Stars: 19
- Watchers: 1
- Forks: 4
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/SemraSh/await-outside)
# `await-outside`
## A better Node REPL for asynchronous explorationInspired by https://github.com/princejwesley/Mancy.
### From This
```
$ node
> const request = require('superagent')
undefined
> request.get('https://www.googleapis.com/books/v1/volumes').
... query({key: 'NOT_A_VALID_API_KEY'}).
... query({q: 'paul auster'}).
... then(r => r.body)
Promise { }
>
```### To This
```
$ await-outside
> const request = require('superagent')
undefined
> await request.get('https://www.googleapis.com/books/v1/volumes').
... query({key: 'NOT_A_VALID_API_KEY'}).
... query({q: 'paul auster'}).
... then(r => r.body)
{ kind: 'books#volumes',
totalItems: 2342,
items: [ ... ] }
>
```