sdfsdfs
This commit is contained in:
15
node_modules/pixi.js/lib/rendering/renderers/shared/utils/parseFunctionBody.js
generated
vendored
Normal file
15
node_modules/pixi.js/lib/rendering/renderers/shared/utils/parseFunctionBody.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
"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();
|
||||
}
|
||||
|
||||
exports.parseFunctionBody = parseFunctionBody;
|
||||
//# sourceMappingURL=parseFunctionBody.js.map
|
Reference in New Issue
Block a user