Micro framework in JavaScript for basic promises