MCPcopy Index your code
hub / github.com/Project-DARC/DARC / isValidBigIntOrNumberArray

Function isValidBigIntOrNumberArray

darc-js/src/SDK/opcodes/utils.ts:26–34  ·  view source on GitHub ↗

* This function checks if the input array is a valid array of bigints or numbers * @param inputArray The array to be checked * @returns True if the array is valid, false otherwise

(inputArray: bigint[] | number[])

Source from the content-addressed store, hash-verified

24 * @returns True if the array is valid, false otherwise
25 */
26function isValidBigIntOrNumberArray(inputArray: bigint[] | number[]): boolean {
27 if (typeof inputArray[0] === "bigint") {
28 return true;
29 }
30 else if (typeof inputArray[0] === "number") {
31 return true;
32 }
33 return false;
34}
35
36function isValidAddressArray(inputArray: string[]): boolean {
37 if (typeof inputArray[0] === "string") {

Calls

no outgoing calls

Tested by

no test coverage detected