validateAllArgsArray

It resolves the list of args if they are Arrays. If there is at least one item from the list that is not an array, this function will throw.
Parameter ListReturnsRejection Errors
  • ...everything: Array<*>
Promise<Array<*>>
Related FunctionsFunction Signature
function validateAllArgsArray(...everything): Promise<Array<*>>
1 2 3 import { validateAllArgsArray } from "puddy-m/lib/validators/complexValidators"; validateAllArgsArray([], [], []).then((arrays) => console.log(arrays)); // [[],[],[]]
1 2 3 4 5 6 7 8 9 10 11 12 import { validateAllArgsArray } from "puddy-m/lib/validators/complexValidators"; const run = async () => { try { const arrayArgs = await validateAllArgsArray([4], [3], "[]"); } catch (e) { // Throws ArrayValidationError console.log(e); } }; run();