Open KrezerJ opened 7 years ago
If a programmer wants to check if a value is a number OR a string, a simple array could be passed to the check function.
Example: var it = ok.check(person, 'phone'); it.is.typeof(['string','number']);
Notes: typeof and kindof would support this. I'm not sure about equals. That would almost work better as additional function parameters.
pulling value from arguments would be a better source for the OR type multiple entry. I assume AND can already be accomplished by chaining assertions.
If a programmer wants to check if a value is a number OR a string, a simple array could be passed to the check function.
Example: var it = ok.check(person, 'phone'); it.is.typeof(['string','number']);
Notes: typeof and kindof would support this. I'm not sure about equals. That would almost work better as additional function parameters.