utiller 1.0.98 → 1.0.99
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
|
@@ -328,11 +328,13 @@ var Utiller = /*#__PURE__*/function () {
|
|
|
328
328
|
|
|
329
329
|
return true;
|
|
330
330
|
}
|
|
331
|
+
/** 取得reg match 第一個項目, 不然好煩呀 */
|
|
332
|
+
|
|
331
333
|
}, {
|
|
332
|
-
key: "
|
|
333
|
-
value: function
|
|
334
|
+
key: "getStringOfHeadMatch",
|
|
335
|
+
value: function getStringOfHeadMatch(string, regex) {
|
|
334
336
|
var flag = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "g";
|
|
335
|
-
var result = string.match(new RegExp(
|
|
337
|
+
var result = string.match(new RegExp(regex, flag));
|
|
336
338
|
return this.isUndefinedNullEmpty(result) ? undefined : result[0];
|
|
337
339
|
}
|
|
338
340
|
}, {
|
package/package.json
CHANGED