frontend/.pnpm-store/v3/files/49/bd13344c49c80ab9dda065b8fce58de780c7d8a9f15c50fe9f2643b6a6d632744c5e5576d1d6e704bb501ab6823d8bbf9148d5f5c89ff0ed24ad8eb9ed73d6

23 lines
541 B
Plaintext

"use strict";
var mixin = require("../../object/mixin")
, validFunction = require("../valid-function")
, re = /^\s*function\s*([\0-')-\uffff]+)*\s*\(([\0-(*-\uffff]*)\)\s*\{/;
module.exports = function () {
var match = String(validFunction(this)).match(re), fn;
// eslint-disable-next-line no-new-func
fn = new Function(
"fn",
"return function " +
match[1].trim() +
"(" +
match[2] +
") { return fn.apply(this, arguments); };"
)(this);
try { mixin(fn, this); }
catch (ignore) {}
return fn;
};