utiller 1.0.230 → 1.0.232

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.
@@ -220,10 +220,11 @@ var Utiller = /*#__PURE__*/function () {
220
220
  key: "getStringOfNormalize",
221
221
  value: function getStringOfNormalize(value) {
222
222
  var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
223
- if (_lodash["default"].isString(value)) return value;
223
+ var trim = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
224
+ if (_lodash["default"].isString(value)) return trim ? _lodash["default"].trim(value) : value;
224
225
  try {
225
226
  var force = _lodash["default"].toString(value);
226
- return this.isOrEquals(force, "", "undefined") ? defaultValue : force;
227
+ return this.isOrEquals(force, "", "undefined") ? defaultValue : trim ? _lodash["default"].trim(force) : force;
227
228
  } catch (error) {
228
229
  Util.appendError("448616845453 ".concat(error.message));
229
230
  }
@@ -932,7 +933,7 @@ var Utiller = /*#__PURE__*/function () {
932
933
  var string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
933
934
  var inputValue = string.replace(/\D/g, ""); // Remove all non-digit characters
934
935
  var result = inputValue.replace(/(\d{4})(?=\d)/g, "$1-"); // Add a dash every 4 digits
935
- return result.slice(0, 16);
936
+ return result.slice(0, 19);
936
937
  }
937
938
  }, {
938
939
  key: "getObjectKey",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utiller",
3
- "version": "1.0.230",
3
+ "version": "1.0.232",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -11,7 +11,7 @@
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
13
  "configerer": "^1.0.11",
14
- "utiller": "^1.0.229",
14
+ "utiller": "^1.0.231",
15
15
  "linepayer": "^1.0.4",
16
16
  "databazer": "^1.0.12",
17
17
  "lodash": "^4.17.20",