UNPKG

@sentry/node

Version:

Sentry Node SDK using OpenTelemetry for performance instrumentation

23 lines (22 loc) • 715 B
// src/integrations/fs/vendored/utils.ts function splitTwoLevels(functionName) { const memberParts = functionName.split("."); if (memberParts.length > 1) { if (memberParts.length !== 2) throw Error(`Invalid member function name ${functionName}`); return memberParts; } else return [functionName]; } function indexFs(fs, member) { if (!member) throw new Error(JSON.stringify({ member })); const [functionName1, functionName2] = splitTwoLevels(member); if (functionName2) return { objectToPatch: fs[functionName1], functionNameToPatch: functionName2 }; else return { objectToPatch: fs, functionNameToPatch: functionName1 }; } export { indexFs, splitTwoLevels }; //# sourceMappingURL=utils.js.map