MultiLoader-Template/node_modules/es-toolkit/dist/compat/math/multiply.js
3944Realms 768f38fc97 feat: 可使用的构建模板
修改了脚本,使其可以推给Maven仓库
2026-05-03 13:02:19 +08:00

27 lines
706 B
JavaScript

'use strict';
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const toNumber = require('../util/toNumber.js');
const toString = require('../util/toString.js');
function multiply(value, other) {
if (value === undefined && other === undefined) {
return 1;
}
if (value === undefined || other === undefined) {
return value ?? other;
}
if (typeof value === 'string' || typeof other === 'string') {
value = toString.toString(value);
other = toString.toString(other);
}
else {
value = toNumber.toNumber(value);
other = toNumber.toNumber(other);
}
return value * other;
}
exports.multiply = multiply;