MCPcopy
hub / github.com/pyodide/pyodide / has

Method has

src/core/pyproxy.ts:1083–1097  ·  view source on GitHub ↗

* This translates to the Python code ``key in obj``. * * @param key The key to check for. * @returns Is ``key`` present?

(key: any)

Source from the content-addressed store, hash-verified

1081 * @returns Is ``key`` present?
1082 */
1083 has(key: any): boolean {
1084 let ptrobj = _getPtr(this);
1085 let result;
1086 try {
1087 Py_ENTER();
1088 result = __pyproxy_contains(ptrobj, key);
1089 Py_EXIT();
1090 } catch (e) {
1091 API.fatal_error(e);
1092 }
1093 if (result === -1) {
1094 _pythonexc2js();
1095 }
1096 return result === 1;
1097 }
1098}
1099
1100/**

Callers 15

addPackageToLoadMethod · 0.80
recursiveDependenciesMethod · 0.80
downloadAndInstallMethod · 0.80
getFunction · 0.80
literal-map.jsFile · 0.80
getOwnPropertyDescriptorFunction · 0.80
dirsToMountFunction · 0.80
error_handling.tsFile · 0.80
includesMethod · 0.80
filteredHasKeyFunction · 0.80
hasFunction · 0.80

Calls 1

_getPtrFunction · 0.85

Tested by

no test coverage detected