(values, test)
| 1 | export default function filter(values, test) { |
| 2 | if (typeof test !== "function") throw new TypeError("test is not a function"); |
| 3 | const array = []; |
| 4 | let index = -1; |
| 5 | for (const value of values) { |
| 6 | if (test(value, ++index, values)) { |
| 7 | array.push(value); |
| 8 | } |
| 9 | } |
| 10 | return array; |
| 11 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…