sbd-npm 1.2.68 → 1.2.69
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/package.json +1 -1
- package/util.js +10 -2
package/package.json
CHANGED
package/util.js
CHANGED
@@ -1767,8 +1767,16 @@ const Util = {
|
|
1767
1767
|
* @returns {boolean}
|
1768
1768
|
*/
|
1769
1769
|
is_alpha: function (str) {
|
1770
|
-
|
1771
|
-
|
1770
|
+
return /^[A-Za-z]*$/.test(str);
|
1771
|
+
},
|
1772
|
+
|
1773
|
+
/**
|
1774
|
+
* 是否都是数字
|
1775
|
+
* @param str
|
1776
|
+
* @returns {boolean}
|
1777
|
+
*/
|
1778
|
+
is_digit: function (str) {
|
1779
|
+
return /^\d+$/.test(str);
|
1772
1780
|
},
|
1773
1781
|
|
1774
1782
|
/**
|