A toy JavaScript Promises library