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

21
node_modules/mathjs/lib/esm/json/reviver.js generated vendored Normal file
View File

@@ -0,0 +1,21 @@
import { factory } from '../utils/factory.js';
var name = 'reviver';
var dependencies = ['classes'];
export var createReviver = /* #__PURE__ */factory(name, dependencies, _ref => {
var {
classes
} = _ref;
/**
* Instantiate mathjs data types from their JSON representation
* @param {string} key
* @param {*} value
* @returns {*} Returns the revived object
*/
return function reviver(key, value) {
var constructor = classes[value && value.mathjs];
if (constructor && typeof constructor.fromJSON === 'function') {
return constructor.fromJSON(value);
}
return value;
};
});