commit dist

This commit is contained in:
LittleBoy 2025-04-18 11:17:22 +08:00
parent 694e106bcf
commit 73441fc007
2 changed files with 49 additions and 0 deletions

36
dist/index.cjs vendored Normal file
View File

@ -0,0 +1,36 @@
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// libs/index.ts
var index_exports = {};
__export(index_exports, {
formatMoney: () => formatMoney,
helloWorld: () => helloWorld
});
module.exports = __toCommonJS(index_exports);
function helloWorld() {
console.log("Hello World!");
}
function formatMoney(amount) {
return new Intl.NumberFormat("en-US", { style: "decimal", minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(amount);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
formatMoney,
helloWorld
});

13
dist/index.d.cts vendored Normal file
View File

@ -0,0 +1,13 @@
declare function helloWorld(): void;
/**
*
* ,
* @param amount -
* @returns 2
* @example
* formatMoney(1234.5) // 返回 "1,234.50"
* formatMoney(1000000) // 返回 "1,000,000.00"
*/
declare function formatMoney(amount: number): string;
export { formatMoney, helloWorld };