utiller 1.0.31 → 1.0.32
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
CHANGED
|
@@ -865,6 +865,14 @@ var Utiller = /*#__PURE__*/function () {
|
|
|
865
865
|
return _lodash["default"].trim(each);
|
|
866
866
|
}).join("");
|
|
867
867
|
}
|
|
868
|
+
}, {
|
|
869
|
+
key: "toNewLineLessString",
|
|
870
|
+
value: function toNewLineLessString(string) {
|
|
871
|
+
/** 這樣寫也可以 string.split('').map((each) => each.trim()).join(''); */
|
|
872
|
+
return _lodash["default"].split(string, "\n").map(function (each) {
|
|
873
|
+
return _lodash["default"].trim(each);
|
|
874
|
+
}).join("");
|
|
875
|
+
}
|
|
868
876
|
}, {
|
|
869
877
|
key: "exist",
|
|
870
878
|
value: function exist(obj) {
|
|
@@ -908,7 +916,7 @@ var Utiller = /*#__PURE__*/function () {
|
|
|
908
916
|
|
|
909
917
|
return _lodash["default"].isEmpty(after) ? string : after;
|
|
910
918
|
}
|
|
911
|
-
/** 讓字串開頭不可以是 predicate, ex: `,, \n\t\s i'm good today?` =>
|
|
919
|
+
/** 讓字串開頭不可以是 predicate, ex: `,, \n\t\s i'm good today?` => `\n\t\s i'm good today` */
|
|
912
920
|
|
|
913
921
|
}, {
|
|
914
922
|
key: "getNormalizedStringNotEndWith",
|
package/package.json
CHANGED