Add support for multiple predicates to is.any (#104)

This commit is contained in:
Dave Cohen 2020-02-16 19:06:19 -06:00 committed by GitHub
parent f97029fd73
commit d1929ad47c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 5 deletions

View file

@ -1458,6 +1458,8 @@ test('is.any', t => {
t.true(is.any(is.object, false, {}, 'unicorns'));
t.false(is.any(is.boolean, '🦄', [], 3));
t.false(is.any(is.integer, true, 'lol', {}));
t.true(is.any([is.string, is.number], {}, true, '🦄'));
t.false(is.any([is.boolean, is.number], 'unicorns', [], new Map()));
t.throws(() => {
is.any(null as any, true);