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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/util.js +10 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.2.68",
3
+ "version": "1.2.69",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -1767,8 +1767,16 @@ const Util = {
1767
1767
  * @returns {boolean}
1768
1768
  */
1769
1769
  is_alpha: function (str) {
1770
- let re = /^[A-Za-z]*$/;
1771
- return re.test(str);
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
  /**