I am building a simple charting tool. When a user chooses a data source and a chart type, both the data and the script for the specific chart (.js) are loaded and then the code
I strongly suggest using an implementation of the Promises/A specification, which is becoming the standard way of doing promises in JavaScript. Promises work better when everyone uses the same flavor, so it's in everyone's interest to use compatible implementations.
Q is probably the most popular and fully featured implementation (it also will adapt jQuery and other incompatible promises), while when and rsvp are supposed to be more "lightweight".