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

Function array_includes

src/PyListProxyHandler.cc:667–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665}
666
667static bool array_includes(JSContext *cx, unsigned argc, JS::Value *vp) {
668 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
669
670 if (!args.requireAtLeast(cx, "includes", 1)) {
671 return false;
672 }
673
674 if (!array_indexOf(cx, argc, vp)) {
675 return false;
676 }
677
678 args.rval().setBoolean(args.rval().get().toInt32() >= 0 ? true : false);
679 return true;
680}
681
682static bool array_forEach(JSContext *cx, unsigned argc, JS::Value *vp) {
683 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);

Callers

nothing calls this directly

Calls 2

array_indexOfFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected