You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the old iota.lib.js, the related isArrayOf method has four methods. The methods are as follows:
isArrayOfAttachedTrytes
isArrayOfHashes
isArrayOfTrytes
isArrayOfTxObjects
I think it should be divided into different methods because the isArrayOf is not good enough to handle different arrays. It's not proper to use the instanceof approach to validate other non-class types.
Another approach is: enhancing the isArrayOf and let this method can support validating the different methods.
The text was updated successfully, but these errors were encountered:
Firstly, we can consider the following code snippet in
IOTA\Util\ValidatorUtil
class:According to the old
iota.lib.js
, the relatedisArrayOf
method has four methods. The methods are as follows:isArrayOfAttachedTrytes
isArrayOfHashes
isArrayOfTrytes
isArrayOfTxObjects
I think it should be divided into different methods because the
isArrayOf
is not good enough to handle different arrays. It's not proper to use theinstanceof
approach to validate other non-class types.Another approach is: enhancing the
isArrayOf
and let this method can support validating the different methods.The text was updated successfully, but these errors were encountered: