@lodestar/utils 1.8.0-dev.42ecf97999 → 1.8.0-dev.50e9ca5df6

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/lib/format.d.ts CHANGED
@@ -3,4 +3,9 @@
3
3
  * 4 bytes can represent 4294967296 values, so the chance of collision is low
4
4
  */
5
5
  export declare function prettyBytes(root: Uint8Array | string): string;
6
+ /**
7
+ * Format bytes as `0x1234…`
8
+ * Paired with block numbers or slots, it can still act as a decent identify-able format
9
+ */
10
+ export declare function prettyBytesShort(root: Uint8Array | string): string;
6
11
  //# sourceMappingURL=format.d.ts.map
package/lib/format.js CHANGED
@@ -7,4 +7,12 @@ export function prettyBytes(root) {
7
7
  const str = typeof root === "string" ? root : toHexString(root);
8
8
  return `${str.slice(0, 6)}…${str.slice(-4)}`;
9
9
  }
10
+ /**
11
+ * Format bytes as `0x1234…`
12
+ * Paired with block numbers or slots, it can still act as a decent identify-able format
13
+ */
14
+ export function prettyBytesShort(root) {
15
+ const str = typeof root === "string" ? root : toHexString(root);
16
+ return `${str.slice(0, 6)}…`;
17
+ }
10
18
  //# sourceMappingURL=format.js.map
package/lib/format.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AAEvC;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,IAAyB;IACnD,MAAM,GAAG,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/C,CAAC"}
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AAEvC;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,IAAyB;IACnD,MAAM,GAAG,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAyB;IACxD,MAAM,GAAG,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC;AAC/B,CAAC"}
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/ChainSafe/lodestar/issues"
13
13
  },
14
- "version": "1.8.0-dev.42ecf97999",
14
+ "version": "1.8.0-dev.50e9ca5df6",
15
15
  "type": "module",
16
16
  "exports": "./lib/index.js",
17
17
  "files": [
@@ -57,5 +57,5 @@
57
57
  "beacon",
58
58
  "blockchain"
59
59
  ],
60
- "gitHead": "1ff2aa9f1440b0169b377da3d38fccac37e7796e"
60
+ "gitHead": "2d8b302a5587896a92594be4b9cbe54fd2fca312"
61
61
  }