Using arrow functions it doesn't seems so verbose
```js
function requestInput(question) {
  return new Promise(function(resolve) {
    interface.question(question, function(input) {
      resolve(input);
    })
  })
}
```
can be written as:
```js
const requestInput = question => new Promise((resolve) => {
  interface.question(question, resolve); // You can wrap resolve in a
`unary` helper if more than 1 argument is problematic
});
```

I don't see a problem with verbosity
-- 
Augusto Moura
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to