A custom promise implementation for Node