@polkadot/types-codec 15.5.2 → 15.7.1

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.
@@ -33,7 +33,7 @@ export declare class Struct<S extends TypesDef = TypesDef, V extends {
33
33
  */
34
34
  get defKeys(): string[];
35
35
  /**
36
- * @description Checks if the value is an empty value
36
+ * @description Checks if the value is an empty value '{}'
37
37
  */
38
38
  get isEmpty(): boolean;
39
39
  /**
@@ -115,15 +115,10 @@ class Struct extends Map {
115
115
  return this.__internal__Types[1];
116
116
  }
117
117
  /**
118
- * @description Checks if the value is an empty value
118
+ * @description Checks if the value is an empty value '{}'
119
119
  */
120
120
  get isEmpty() {
121
- for (const v of this.values()) {
122
- if (!v.isEmpty) {
123
- return false;
124
- }
125
- }
126
- return true;
121
+ return [...this.keys()].length === 0;
127
122
  }
128
123
  /**
129
124
  * @description The length of the value when encoded as a Uint8Array
@@ -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: '15.5.2' };
4
+ exports.packageInfo = { name: '@polkadot/types-codec', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '15.7.1' };
@@ -33,7 +33,7 @@ export declare class Struct<S extends TypesDef = TypesDef, V extends {
33
33
  */
34
34
  get defKeys(): string[];
35
35
  /**
36
- * @description Checks if the value is an empty value
36
+ * @description Checks if the value is an empty value '{}'
37
37
  */
38
38
  get isEmpty(): boolean;
39
39
  /**
package/native/Struct.js CHANGED
@@ -112,15 +112,10 @@ export class Struct extends Map {
112
112
  return this.__internal__Types[1];
113
113
  }
114
114
  /**
115
- * @description Checks if the value is an empty value
115
+ * @description Checks if the value is an empty value '{}'
116
116
  */
117
117
  get isEmpty() {
118
- for (const v of this.values()) {
119
- if (!v.isEmpty) {
120
- return false;
121
- }
122
- }
123
- return true;
118
+ return [...this.keys()].length === 0;
124
119
  }
125
120
  /**
126
121
  * @description The length of the value when encoded as a Uint8Array
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "./cjs/packageDetect.js"
19
19
  ],
20
20
  "type": "module",
21
- "version": "15.5.2",
21
+ "version": "15.7.1",
22
22
  "main": "./cjs/index.js",
23
23
  "module": "./index.js",
24
24
  "types": "./index.d.ts",
@@ -1142,8 +1142,8 @@
1142
1142
  }
1143
1143
  },
1144
1144
  "dependencies": {
1145
- "@polkadot/util": "^13.3.1",
1146
- "@polkadot/x-bigint": "^13.3.1",
1145
+ "@polkadot/util": "^13.4.3",
1146
+ "@polkadot/x-bigint": "^13.4.3",
1147
1147
  "tslib": "^2.8.1"
1148
1148
  }
1149
1149
  }
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: '15.5.2' };
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: '15.7.1' };