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">

16 lines (13 loc) 450 B
'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