@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.
- package/dist/cjs/utils/bytes.js +3 -0
- package/dist/cjs/utils/duration.js +4 -0
- package/dist/cjs/utils/size.js +3 -0
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/utils/bytes.js +3 -0
- package/dist/mjs/utils/duration.js +4 -0
- package/dist/mjs/utils/size.js +3 -0
- package/dist/types/utils/bytes.d.ts +1 -0
- package/dist/types/utils/duration.d.ts +1 -0
- package/dist/types/utils/size.d.ts +1 -0
- package/package.json +2 -2
package/dist/mjs/utils/bytes.js
CHANGED
|
@@ -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
|
}
|
package/dist/mjs/utils/size.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethersphere/bee-js",
|
|
3
|
-
"version": "9.
|
|
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": "^
|
|
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"
|