[Vuejs]-Vue image size filter

0👍

You are filtering on a single value (the URL) what you should really do is filter on the array of URLs the same way the filter filter is implemented.
Have a look at the source code where I removed the boring parts:

export function filterBy (arr, search, delimiter) {
  ... stuff ...
  for (var i = 0, l = arr.length; i < l; i++) {
    ... stuff ...
      if (/*some condition items must pass*/) { // <-- here you put the condition on size
          res.push(item)
    ... stuff ...
  return res
}

Leave a comment