@leofcoin/codec-format-interface 1.7.0 → 1.7.2
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.
|
@@ -111,7 +111,8 @@ class FormatInterface extends BasicInterface {
|
|
|
111
111
|
return this.#hash;
|
|
112
112
|
const upper = this.hashFormat.charAt(0).toUpperCase();
|
|
113
113
|
const format = `${upper}${this.hashFormat.substring(1, this.hashFormat.length)}`;
|
|
114
|
-
|
|
114
|
+
this.#hash = (await this.peernetHash)[`to${format}`]();
|
|
115
|
+
return this.#hash;
|
|
115
116
|
}
|
|
116
117
|
fromUint8Array(buffer) {
|
|
117
118
|
this.encoded = buffer;
|
|
@@ -133,7 +134,7 @@ class FormatInterface extends BasicInterface {
|
|
|
133
134
|
decoded[key] = data[key];
|
|
134
135
|
}
|
|
135
136
|
this.decoded = decoded;
|
|
136
|
-
|
|
137
|
+
return this.encode(decoded);
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
140
|
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leofcoin/codec-format-interface",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
|
-
".": "./
|
|
7
|
+
".": "./exports/index.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"exports"
|
|
11
11
|
],
|
|
12
|
-
"typings": "
|
|
12
|
+
"typings": "exports/index.d.ts",
|
|
13
13
|
"scripts": {
|
|
14
14
|
"prepublish": "npm run build && npm version patch",
|
|
15
15
|
"build": "rollup -c",
|