MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / isPromise

Function isPromise

src/internalBinding/utils.cc:45–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45static bool isPromise(JSContext *cx, unsigned argc, JS::Value *vp) {
46 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
47 JS::HandleValue objVal = args.get(0);
48 JS::RootedObject obj(cx, JS::ToObject(cx, objVal));
49 args.rval().setBoolean(JS::IsPromiseObject(obj));
50 return true;
51}
52
53static bool isRegExp(JSContext *cx, unsigned argc, JS::Value *vp) {
54 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);

Callers 1

formatValueFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected