File size: 264 Bytes
bc20498 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
function index (callback = this) {
return String(callback).replace(
/^(async\s*)?(\bfunction\b)?(.*?)\(/,
(_, isAsync, fn, name) => (
name && !fn ?
`${isAsync || ""}function ${name}(` :
_
),
);
}
export { index as default };
|