Closed peetzweg closed 1 year ago
I think it is fine as-is - unknown
also caters for undefined
. (So isWasm
seems to go a bit overboard in this case - I think this is the case with a lot of functions, where ?
is not strictly required...)
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Introduced in originally in this PR https://github.com/polkadot-js/api/pull/5699#pullrequestreview-1604611089 , it was suggested to be moved to the
@polkadot/common
package.I've basically just copied over the code form the pr in the api package. The
isWasm
andisRiscV
function signature differs as theisWasm
's parameter of bytes is optional. Should we align both functions to have a optional or required parameter?https://github.com/peetzweg/common/blob/d8a4d018f18fe69f2ad796d986ff950335cb2b35/packages/util/src/is/riscv.ts#L15-L17
https://github.com/peetzweg/common/blob/d8a4d018f18fe69f2ad796d986ff950335cb2b35/packages/util/src/is/wasm.ts#L15-L17