فهرست منبع

feat: add @jy/util example

zhangyuhan 2 سال پیش
والد
کامیت
dc216d2ff6
3فایلهای تغییر یافته به همراه25 افزوده شده و 0 حذف شده
  1. 1 0
      packages/util/index.js
  2. 12 0
      packages/util/modules/format/index.js
  3. 12 0
      packages/util/package.json

+ 1 - 0
packages/util/index.js

@@ -0,0 +1 @@
+export * from './modules/format'

+ 12 - 0
packages/util/modules/format/index.js

@@ -0,0 +1,12 @@
+/**
+ * 示例: 用于为金额添加后缀单位展示
+ * @param money - 金额
+ * @returns {string}
+ */
+function formatMoney (money) {
+    return money + '万元'
+}
+
+export {
+    formatMoney
+}

+ 12 - 0
packages/util/package.json

@@ -0,0 +1,12 @@
+{
+  "name": "@jy/util",
+  "version": "0.0.1",
+  "description": "剑鱼项目通用工具集",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "keywords": [],
+  "author": "",
+  "license": "ISC"
+}