Files
nothoughts/node_modules/pixi.js/lib/rendering/renderers/shared/utils/parseFunctionBody.mjs
2025-08-04 18:57:35 +02:00

14 lines
419 B
JavaScript

"use strict";
function parseFunctionBody(fn) {
const fnStr = fn.toString();
const bodyStart = fnStr.indexOf("{");
const bodyEnd = fnStr.lastIndexOf("}");
if (bodyStart === -1 || bodyEnd === -1) {
throw new Error("getFunctionBody: No body found in function definition");
}
return fnStr.slice(bodyStart + 1, bodyEnd).trim();
}
export { parseFunctionBody };
//# sourceMappingURL=parseFunctionBody.mjs.map