@ethersphere/bee-js 9.3.0 → 9.4.0

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.
@@ -64,4 +64,7 @@ export class Bytes {
64
64
  equals(other) {
65
65
  return this.toHex() === new Bytes(other).toHex();
66
66
  }
67
+ represent() {
68
+ return this.toHex();
69
+ }
67
70
  }
@@ -1,3 +1,4 @@
1
+ import { Dates } from 'cafe-utility';
1
2
  export class Duration {
2
3
  constructor(seconds) {
3
4
  this.seconds = Math.ceil(seconds);
@@ -44,4 +45,7 @@ export class Duration {
44
45
  toEndDate(startDate) {
45
46
  return new Date((startDate ?? new Date()).getTime() + this.seconds * 1000);
46
47
  }
48
+ represent() {
49
+ return Dates.secondsToHumanTime(this.seconds);
50
+ }
47
51
  }
@@ -34,4 +34,7 @@ export class Size {
34
34
  toFormattedString() {
35
35
  return Numbers.convertBytes(this.bytes, 1000);
36
36
  }
37
+ represent() {
38
+ return this.toFormattedString();
39
+ }
37
40
  }
@@ -14,4 +14,5 @@ export declare class Bytes {
14
14
  toUtf8(): string;
15
15
  toJSON(): unknown;
16
16
  equals(other: Bytes | Uint8Array | string): boolean;
17
+ represent(): string;
17
18
  }
@@ -14,4 +14,5 @@ export declare class Duration {
14
14
  toWeeks(): number;
15
15
  toYears(): number;
16
16
  toEndDate(startDate?: Date): Date;
17
+ represent(): string;
17
18
  }
@@ -15,4 +15,5 @@ export declare class Size {
15
15
  toBytes(): number;
16
16
  toGigabytes(): number;
17
17
  toFormattedString(): string;
18
+ represent(): string;
18
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethersphere/bee-js",
3
- "version": "9.3.0",
3
+ "version": "9.4.0",
4
4
  "description": "Javascript client for Bee",
5
5
  "keywords": [
6
6
  "bee",
@@ -62,7 +62,7 @@
62
62
  },
63
63
  "dependencies": {
64
64
  "axios": "^0.30.0",
65
- "cafe-utility": "^27.14.2",
65
+ "cafe-utility": "^28.1.0",
66
66
  "isomorphic-ws": "^4.0.1",
67
67
  "semver": "^7.3.5",
68
68
  "ws": "^8.7.0"