UNPKG

pixi.js

Version:

<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">

14 lines (12 loc) 419 B
"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