utiller 1.0.97 → 1.0.98
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,6 +328,13 @@ var Utiller = /*#__PURE__*/function () {
|
|
|
328
328
|
|
|
329
329
|
return true;
|
|
330
330
|
}
|
|
331
|
+
}, {
|
|
332
|
+
key: "getHeadMatch",
|
|
333
|
+
value: function getHeadMatch(string, rule) {
|
|
334
|
+
var flag = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "g";
|
|
335
|
+
var result = string.match(new RegExp(rule, flag));
|
|
336
|
+
return this.isUndefinedNullEmpty(result) ? undefined : result[0];
|
|
337
|
+
}
|
|
331
338
|
}, {
|
|
332
339
|
key: "or",
|
|
333
340
|
value: function or() {
|
package/package.json
CHANGED