MCPcopy Create free account
hub / github.com/ComPDFKit/compdfkit-pdf-sdk-react-native / get

Function get

src/core/ComPDFKitModule.ts:305–322  ·  view source on GitHub ↗
(target, property, receiver)

Source from the content-addressed store, hash-verified

303
304const ComPDFKit = new Proxy(comPDFKitBase, {
305 get(target, property, receiver) {
306 const value = Reflect.get(target, property, receiver);
307
308 if (
309 typeof property === "string" &&
310 (nativeMethodNames as readonly string[]).includes(property) &&
311 typeof value === "undefined"
312 ) {
313 return (...args: unknown[]) => {
314 const method = getRequiredNativeMethod(
315 property as (typeof nativeMethodNames)[number]
316 ) as (...methodArgs: unknown[]) => unknown;
317 return method(...args);
318 };
319 }
320
321 return value;
322 },
323}) as ComPDFKitModule;
324
325export { ComPDFKit };

Callers

nothing calls this directly

Calls 2

getRequiredNativeMethodFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected