A promise library with native and emulated support