Simplify main function behind legacy adapter
authorRaphael von der Grün <raphinesse@gmail.com>
Thu, 5 Jul 2018 10:48:38 +0000 (12:48 +0200)
committerRaphael von der Grün <raphinesse@gmail.com>
Thu, 5 Jul 2018 10:48:38 +0000 (12:48 +0200)
commite020d8db9871f6689298577e80d1962e9300d027
treea28276b29e726f4df83b26fa20f5f8bd0d707ef8
parentb990ac824fe6ed2d81043d3a2432ec43a1602a10
Simplify main function behind legacy adapter

Including:
- Unwrap deeply nested options object
- Rename options object to `opts`
- Shallow copy `opts` to avoid mutating caller's object
- Make Q-wrapping explicit

Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
index.js