@observablehq/notebook-kit 1.1.0-rc.5 → 1.1.0-rc.7
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/dist/package.json
CHANGED
|
@@ -54,7 +54,7 @@ function revive({ rows, schema, date, ...meta }) {
|
|
|
54
54
|
const value = row[name];
|
|
55
55
|
if (value == null)
|
|
56
56
|
continue;
|
|
57
|
-
row[name] =
|
|
57
|
+
row[name] = Number(value); // TODO BigInt?
|
|
58
58
|
}
|
|
59
59
|
break;
|
|
60
60
|
}
|
|
@@ -64,7 +64,7 @@ function revive({ rows, schema, date, ...meta }) {
|
|
|
64
64
|
const value = row[name];
|
|
65
65
|
if (value == null)
|
|
66
66
|
continue;
|
|
67
|
-
row[name] =
|
|
67
|
+
row[name] = asDate(value);
|
|
68
68
|
}
|
|
69
69
|
break;
|
|
70
70
|
}
|
|
@@ -74,6 +74,9 @@ function revive({ rows, schema, date, ...meta }) {
|
|
|
74
74
|
date = new Date(date);
|
|
75
75
|
return Object.assign(rows, { schema, date }, meta);
|
|
76
76
|
}
|
|
77
|
+
function asDate(value) {
|
|
78
|
+
return new Date(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}(?::\d{2})?$/.test(value) ? value + "Z" : value);
|
|
79
|
+
}
|
|
77
80
|
DatabaseClient.hash = hash;
|
|
78
81
|
DatabaseClient.revive = revive;
|
|
79
82
|
DatabaseClient.prototype = DatabaseClientImpl.prototype; // instanceof
|