feat:node-modules

This commit is contained in:
houjunxiang
2025-11-24 10:26:18 +08:00
parent 753766893b
commit 8a3e48d856
8825 changed files with 567399 additions and 1 deletions

30
node_modules/mathjs/lib/cjs/error/ArgumentsError.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ArgumentsError = ArgumentsError;
/**
* Create a syntax error with the message:
* 'Wrong number of arguments in function <fn> (<count> provided, <min>-<max> expected)'
* @param {string} fn Function name
* @param {number} count Actual argument count
* @param {number} min Minimum required argument count
* @param {number} [max] Maximum required argument count
* @extends Error
*/
function ArgumentsError(fn, count, min, max) {
if (!(this instanceof ArgumentsError)) {
throw new SyntaxError('Constructor must be called with the new operator');
}
this.fn = fn;
this.count = count;
this.min = min;
this.max = max;
this.message = 'Wrong number of arguments in function ' + fn + ' (' + count + ' provided, ' + min + (max !== undefined && max !== null ? '-' + max : '') + ' expected)';
this.stack = new Error().stack;
}
ArgumentsError.prototype = new Error();
ArgumentsError.prototype.constructor = Error;
ArgumentsError.prototype.name = 'ArgumentsError';
ArgumentsError.prototype.isArgumentsError = true;

29
node_modules/mathjs/lib/cjs/error/DimensionError.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DimensionError = DimensionError;
/**
* Create a range error with the message:
* 'Dimension mismatch (<actual size> != <expected size>)'
* @param {number | number[]} actual The actual size
* @param {number | number[]} expected The expected size
* @param {string} [relation='!='] Optional relation between actual
* and expected size: '!=', '<', etc.
* @extends RangeError
*/
function DimensionError(actual, expected, relation) {
if (!(this instanceof DimensionError)) {
throw new SyntaxError('Constructor must be called with the new operator');
}
this.actual = actual;
this.expected = expected;
this.relation = relation;
this.message = 'Dimension mismatch (' + (Array.isArray(actual) ? '[' + actual.join(', ') + ']' : actual) + ' ' + (this.relation || '!=') + ' ' + (Array.isArray(expected) ? '[' + expected.join(', ') + ']' : expected) + ')';
this.stack = new Error().stack;
}
DimensionError.prototype = new RangeError();
DimensionError.prototype.constructor = RangeError;
DimensionError.prototype.name = 'DimensionError';
DimensionError.prototype.isDimensionError = true;

41
node_modules/mathjs/lib/cjs/error/IndexError.js generated vendored Normal file
View File

@@ -0,0 +1,41 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.IndexError = IndexError;
/**
* Create a range error with the message:
* 'Index out of range (index < min)'
* 'Index out of range (index < max)'
*
* @param {number} index The actual index
* @param {number} [min=0] Minimum index (included)
* @param {number} [max] Maximum index (excluded)
* @extends RangeError
*/
function IndexError(index, min, max) {
if (!(this instanceof IndexError)) {
throw new SyntaxError('Constructor must be called with the new operator');
}
this.index = index;
if (arguments.length < 3) {
this.min = 0;
this.max = min;
} else {
this.min = min;
this.max = max;
}
if (this.min !== undefined && this.index < this.min) {
this.message = 'Index out of range (' + this.index + ' < ' + this.min + ')';
} else if (this.max !== undefined && this.index >= this.max) {
this.message = 'Index out of range (' + this.index + ' > ' + (this.max - 1) + ')';
} else {
this.message = 'Index out of range (' + this.index + ')';
}
this.stack = new Error().stack;
}
IndexError.prototype = new RangeError();
IndexError.prototype.constructor = RangeError;
IndexError.prototype.name = 'IndexError';
IndexError.prototype.isIndexError = true;