示例工程 21-commonjs-snapshot

21-commonjs-snapshot/01-cjs-shim/dist-cjs/math.js

javascript · 0.2 KB

运行:21 · cjs-shim

点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。

"use strict";
// CJS 模块:导出对象
function add(a, b) {
    return a + b;
}
const math = { add };
module.exports = math;
//# sourceMappingURL=math.js.map