@typeberry/convert 0.8.3 → 0.8.4-9587022
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/index.js +22 -5
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4553,14 +4553,31 @@ function inspectInternal(val, seen) {
|
|
|
4553
4553
|
v += oneLine ? "}" : "\n}";
|
|
4554
4554
|
return v;
|
|
4555
4555
|
}
|
|
4556
|
-
/**
|
|
4556
|
+
/**
|
|
4557
|
+
* Utility function to measure time taken for some operation [ms].
|
|
4558
|
+
*
|
|
4559
|
+
* To reduce allocations, each timer can only track one entry.
|
|
4560
|
+
*
|
|
4561
|
+
*/
|
|
4557
4562
|
function measure(id) {
|
|
4558
|
-
const
|
|
4559
|
-
|
|
4563
|
+
const response = {
|
|
4564
|
+
id,
|
|
4565
|
+
start: 0,
|
|
4566
|
+
duration() {
|
|
4567
|
+
return now() - this.start;
|
|
4568
|
+
},
|
|
4569
|
+
toString() {
|
|
4570
|
+
return `${this.id} took ${(this.duration()).toFixed(2)}ms`;
|
|
4571
|
+
},
|
|
4572
|
+
};
|
|
4573
|
+
return () => {
|
|
4574
|
+
response.start = now();
|
|
4575
|
+
return response;
|
|
4576
|
+
};
|
|
4560
4577
|
}
|
|
4561
4578
|
const BYTES_IN_MB = (/* unused pure expression or super */ null && (1024 * 1024));
|
|
4562
4579
|
const toMb = (bytes) => (bytes / BYTES_IN_MB).toFixed(1);
|
|
4563
|
-
const signedMb = (bytes) => `${bytes >= 0 ? "+" : "
|
|
4580
|
+
const signedMb = (bytes) => `${bytes >= 0 ? "+" : ""}${toMb(bytes)}`;
|
|
4564
4581
|
/** Raw process memory usage, or `null` in environments without `process` (e.g. browser). */
|
|
4565
4582
|
function rawMemoryUsage() {
|
|
4566
4583
|
if (isBrowser() || typeof process.memoryUsage !== "function") {
|
|
@@ -4666,7 +4683,7 @@ function seeThrough(v) {
|
|
|
4666
4683
|
}
|
|
4667
4684
|
|
|
4668
4685
|
;// CONCATENATED MODULE: ./packages/core/utils/package.json
|
|
4669
|
-
const package_namespaceObject = {"rE":"0.8.
|
|
4686
|
+
const package_namespaceObject = /*#__PURE__*/JSON.parse('{"rE":"0.8.4-9587022"}');
|
|
4670
4687
|
;// CONCATENATED MODULE: ./packages/core/utils/result.ts
|
|
4671
4688
|
|
|
4672
4689
|
/**
|