From 61a14f72014e29a51223a2c7079e22e475b8800f Mon Sep 17 00:00:00 2001 From: Ryan Van Etten Date: Fri, 8 May 2020 21:18:58 -0400 Subject: [PATCH] Refactor any (#104) --- ssv.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/ssv.js b/ssv.js index 0807acf..23fbba2 100644 --- a/ssv.js +++ b/ssv.js @@ -31,20 +31,7 @@ } function any(set, search) { - search = split(search) - var l = search.length - if (!l) return false - set = split(set) - var n = set.length - var j = 0 - while (j < n) { - var i = l - var v = set[j++] - while (i--) - if (v === search[i]) - return true - } - return false + return count(not(set, search)) < count(set) } function all(set, search) {