I am interested in writing a js function which receives as input an array of masks and determines whether it is match for numbers only or a string.
Example :
Input:
[/[C-Xc-x]/, ' ']
Output:
String
Input:
[/d/, /d/, ' ']
Output:
Numbers
I tried to write several functions that would do this but I didn’t succeed.