@leofcoin/codec-format-interface 1.6.2 → 1.6.4
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/index.js +4 -3
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -222,7 +222,8 @@ let Codec$1 = class Codec extends BasicInterface$1 {
|
|
|
222
222
|
codec;
|
|
223
223
|
hashAlg;
|
|
224
224
|
get codecs() {
|
|
225
|
-
|
|
225
|
+
const globalCodecs = globalThis.peernet?.codecs || {};
|
|
226
|
+
return { ...globalCodecs, ...codecs };
|
|
226
227
|
}
|
|
227
228
|
constructor(buffer) {
|
|
228
229
|
super();
|
|
@@ -341,7 +342,7 @@ let CodecHash$1 = class CodecHash extends BasicInterface$1 {
|
|
|
341
342
|
}
|
|
342
343
|
if (typeof uint8Array === 'string') {
|
|
343
344
|
if (this.isHex(uint8Array))
|
|
344
|
-
await this.fromHex(
|
|
345
|
+
await this.fromHex(uint8Array);
|
|
345
346
|
if (this.isBase32(uint8Array))
|
|
346
347
|
await this.fromBs32(uint8Array);
|
|
347
348
|
else if (this.isBase58(uint8Array))
|
|
@@ -414,7 +415,7 @@ let CodecHash$1 = class CodecHash extends BasicInterface$1 {
|
|
|
414
415
|
}
|
|
415
416
|
if (typeof buffer === 'string') {
|
|
416
417
|
if (this.isHex(buffer))
|
|
417
|
-
this.fromHex(
|
|
418
|
+
this.fromHex(buffer);
|
|
418
419
|
if (this.isBase32(buffer))
|
|
419
420
|
this.fromBs32(buffer);
|
|
420
421
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leofcoin/codec-format-interface",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
],
|
|
12
12
|
"typings": "dist/index.d.ts",
|
|
13
13
|
"scripts": {
|
|
14
|
-
"
|
|
15
|
-
"build": "rollup -c"
|
|
14
|
+
"publish": "npm run build && npm version patch && npm publish",
|
|
15
|
+
"build": "rollup -c",
|
|
16
|
+
"test": "node test"
|
|
16
17
|
},
|
|
17
18
|
"repository": {
|
|
18
19
|
"type": "git",
|