Skip to content

Commit

Permalink
Refactor any (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanve authored May 9, 2020
1 parent 63ccc1a commit 61a14f7
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions ssv.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 61a14f7

Please sign in to comment.