Ember-timed-promise
This is an extension of Ember.RSVP.Promise that allow the user to set a Timer that will reject the promise if not resolved in time. It uses ES6 syntax internally and babel to compile to ES5 friendly code
Basic Usage
It works like a normal promise, only it accepts a time (in ms) and a promise/jQuery Deferred as an input and a custom message error (Will default to "ms timer exceeded").
Ember.RSVP.Promise
let prom = { Emberrun; // This will delay the promise execution of 150ms}; // The promise will reject and throw an error after 100msreturn 100 prom "It Failed!";
jQuery Deferred
let prom = Ember$;return 2000 prom;
Installation
git clone
this repositorynpm install
bower install
Running
ember serve
- Visit your app at http://localhost:4200/tests.
Running Tests
ember test
ember test --server
Building
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.