Initial commit

This commit is contained in:
Brian McGonagill 2026-03-18 09:02:21 -05:00
commit b3a51a4115
10336 changed files with 2381973 additions and 0 deletions

26
node_modules/fast-check/lib/utils/apply.js generated vendored Normal file
View file

@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.safeApply = safeApply;
const untouchedApply = Function.prototype.apply;
const ApplySymbol = Symbol('apply');
function safeExtractApply(f) {
try {
return f.apply;
}
catch (err) {
return undefined;
}
}
function safeApplyHacky(f, instance, args) {
const ff = f;
ff[ApplySymbol] = untouchedApply;
const out = ff[ApplySymbol](instance, args);
delete ff[ApplySymbol];
return out;
}
function safeApply(f, instance, args) {
if (safeExtractApply(f) === untouchedApply) {
return f.apply(instance, args);
}
return safeApplyHacky(f, instance, args);
}