sbd-npm 1.3.14 → 1.3.15

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 +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.14",
3
+ "version": "1.3.15",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -547,6 +547,7 @@ const Util = {
547
547
  html.push("<td class='hk_industry'>", item["industry"], "</td>");
548
548
  html.push("<td>", Util.map_url(item["province_city"]), "</td>");
549
549
  html.push("<td>", Util.to_float((item["pe_ttm"] ? item["pe_ttm"] : item["pe"]), 2), "</td>");
550
+ html.push("<td>", Util.to_float(item["pb"], 2), "</td>");
550
551
  html.push("<td>", Util.to_float(item["total_shares"], 2), "亿</td>");
551
552
  html.push("<td>", Util.to_float(item["market_capital"], 3), "亿</td>");
552
553
  html.push("<td class='price_", item["code"], "'>", item["price"], "</td>");
@@ -2370,10 +2371,11 @@ const Util = {
2370
2371
  },
2371
2372
 
2372
2373
  /**
2373
- * 删除括号内的字符
2374
+ * 删除括号(中英文括号)内的字符
2374
2375
  */
2375
2376
  strip_bracket_string: function (str) {
2376
- return str.replace(/\([^\)]*\)/g, "");
2377
+ //return str.replace(/\([^\)]*\)/g, "");
2378
+ return str.replace(/[\((][^)\)]*[\))]/g, "")
2377
2379
  },
2378
2380
 
2379
2381
  /**