utiller 1.0.223 → 1.0.225
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/utiller/index.js +13 -2
- package/package.json +1 -1
- package/template/sample.package.json +1 -1
package/lib/utiller/index.js
CHANGED
|
@@ -927,6 +927,12 @@ var Utiller = /*#__PURE__*/function () {
|
|
|
927
927
|
}
|
|
928
928
|
return "";
|
|
929
929
|
}
|
|
930
|
+
}, {
|
|
931
|
+
key: "getStringOfCreditCardFormatted",
|
|
932
|
+
value: function getStringOfCreditCardFormatted(string) {
|
|
933
|
+
var inputValue = string.replace(/\D/g, ""); // Remove all non-digit characters
|
|
934
|
+
return inputValue.replace(/(\d{4})(?=\d)/g, "$1-"); // Add a dash every 4 digits
|
|
935
|
+
}
|
|
930
936
|
}, {
|
|
931
937
|
key: "getObjectKey",
|
|
932
938
|
value: function getObjectKey(obj) {
|
|
@@ -1386,10 +1392,15 @@ var Utiller = /*#__PURE__*/function () {
|
|
|
1386
1392
|
return (0, _moment["default"])(ts ? ts : this.getCurrentTimeStamp()).format("YYYY-MM-DD");
|
|
1387
1393
|
}
|
|
1388
1394
|
}, {
|
|
1389
|
-
key: "
|
|
1390
|
-
value: function
|
|
1395
|
+
key: "getSimpleDateYYMMDDFormat",
|
|
1396
|
+
value: function getSimpleDateYYMMDDFormat(ts) {
|
|
1391
1397
|
return (0, _moment["default"])(ts ? ts : this.getCurrentTimeStamp()).format("YY/MM/DD");
|
|
1392
1398
|
}
|
|
1399
|
+
}, {
|
|
1400
|
+
key: "getSimpleTimeYYMMDDHHmmFormat",
|
|
1401
|
+
value: function getSimpleTimeYYMMDDHHmmFormat(ts) {
|
|
1402
|
+
return (0, _moment["default"])(ts ? ts : this.getCurrentTimeStamp()).format("YY/MM/DD HH:mm");
|
|
1403
|
+
}
|
|
1393
1404
|
}, {
|
|
1394
1405
|
key: "getECPayCurrentTimeFormat",
|
|
1395
1406
|
value: function getECPayCurrentTimeFormat(ts) {
|
package/package.json
CHANGED