Skip to content

Helpers.resolve()

Javi Jiménez edited this page Jun 26, 2016 · 2 revisions

A shortcut method for auto resolve promises when we only have one intent:

Definition

'use strict';

export default (state) => new Promise( (resolve, reject) => {
  if (state.intents && state.intents.length === 1) resolve(state);
});

Feel free to offer new features, improvements or anything you can think of. This project makes sense with your participation and experience using Ava.

Clone this wiki locally