@saber2pr/baidu-chart-api
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -34,3 +34,3 @@ "use strict"; | ||
* @Last Modified by: saber2pr | ||
* @Last Modified time: 2019-07-03 14:35:35 | ||
* @Last Modified time: 2019-07-03 15:00:51 | ||
*/ | ||
@@ -59,2 +59,3 @@ var list_1 = require("@saber2pr/fp/lib/list"); | ||
current = new Date(start); | ||
current.setDate(current.getDate() + 2); | ||
endTime = new Date(end); | ||
@@ -64,6 +65,6 @@ _a.label = 1; | ||
if (!(current < endTime)) return [3 /*break*/, 3]; | ||
current.setDate(current.getDate() + step); | ||
return [4 /*yield*/, RegTime.exec(new Date(current).toJSON())[0].replace(/-/g, "/")]; | ||
return [4 /*yield*/, RegTime.exec(current.toJSON())[0].replace(/-/g, "/")]; | ||
case 2: | ||
_a.sent(); | ||
current.setDate(current.getDate() + step); | ||
return [3 /*break*/, 1]; | ||
@@ -82,4 +83,5 @@ case 3: return [2 /*return*/]; | ||
var _a = result[0], startDate = _a.startDate, endDate = _a.endDate; | ||
console.log(startDate, endDate); | ||
var ts = timeRange(startDate, endDate, 7); | ||
var dss = result.map(function (res) { return exports.parseData(res.data); }); | ||
var dss = result.map(function (res) { return exports.parseData(res.data).slice(1); }); | ||
var head = ["时间"].concat(result.map(function (res) { return res.word; })).join(","); | ||
@@ -86,0 +88,0 @@ var body = fp_1.zips.apply(void 0, [ts].concat(dss)).map(function (line) { return line.join(","); }); |
{ | ||
"name": "@saber2pr/baidu-chart-api", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "> 百度指数数据解析", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23949
456