@polkadot/types-codec 10.12.1 → 10.12.3
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/cjs/native/Json.js +2 -2
- package/cjs/packageInfo.js +1 -1
- package/native/Json.d.ts +1 -1
- package/native/Json.js +2 -2
- package/package.json +1 -1
- package/packageInfo.js +1 -1
package/cjs/native/Json.js
CHANGED
|
@@ -69,11 +69,11 @@ class Json extends Map {
|
|
|
69
69
|
throw new Error('Unimplemented');
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
* @description Converts the Object to
|
|
72
|
+
* @description Converts the Object to a human-friendly JSON, with additional fields, expansion and formatting of information
|
|
73
73
|
*/
|
|
74
74
|
toHuman() {
|
|
75
75
|
return [...this.entries()].reduce((json, [key, value]) => {
|
|
76
|
-
json[key] = (0, util_1.isFunction)(value
|
|
76
|
+
json[key] = (0, util_1.isFunction)(value?.toHuman)
|
|
77
77
|
? value.toHuman()
|
|
78
78
|
: value;
|
|
79
79
|
return json;
|
package/cjs/packageInfo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.packageInfo = void 0;
|
|
4
|
-
exports.packageInfo = { name: '@polkadot/types-codec', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '10.12.
|
|
4
|
+
exports.packageInfo = { name: '@polkadot/types-codec', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '10.12.3' };
|
package/native/Json.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export declare class Json extends Map<string, any> implements Codec {
|
|
|
43
43
|
*/
|
|
44
44
|
toHex(): HexString;
|
|
45
45
|
/**
|
|
46
|
-
* @description Converts the Object to
|
|
46
|
+
* @description Converts the Object to a human-friendly JSON, with additional fields, expansion and formatting of information
|
|
47
47
|
*/
|
|
48
48
|
toHuman(): Record<string, AnyJson>;
|
|
49
49
|
/**
|
package/native/Json.js
CHANGED
|
@@ -66,11 +66,11 @@ export class Json extends Map {
|
|
|
66
66
|
throw new Error('Unimplemented');
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
-
* @description Converts the Object to
|
|
69
|
+
* @description Converts the Object to a human-friendly JSON, with additional fields, expansion and formatting of information
|
|
70
70
|
*/
|
|
71
71
|
toHuman() {
|
|
72
72
|
return [...this.entries()].reduce((json, [key, value]) => {
|
|
73
|
-
json[key] = isFunction(value
|
|
73
|
+
json[key] = isFunction(value?.toHuman)
|
|
74
74
|
? value.toHuman()
|
|
75
75
|
: value;
|
|
76
76
|
return json;
|
package/package.json
CHANGED
package/packageInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageInfo = { name: '@polkadot/types-codec', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '10.12.
|
|
1
|
+
export const packageInfo = { name: '@polkadot/types-codec', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '10.12.3' };
|