ripple-binary-codec 2.0.0 → 2.1.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.
@@ -14,7 +14,13 @@ const OBJECT_END_MARKER = Uint8Array.from([0xe1])
14
14
  */
15
15
  function isObjects(args): args is Array<JsonObject> {
16
16
  return (
17
- Array.isArray(args) && (args.length === 0 || typeof args[0] === 'object')
17
+ Array.isArray(args) &&
18
+ args.every(
19
+ (arg) =>
20
+ typeof arg === 'object' &&
21
+ Object.keys(arg).length === 1 &&
22
+ typeof Object.values(arg)[0] === 'object',
23
+ )
18
24
  )
19
25
  }
20
26