Skip to content

Instantly share code, notes, and snippets.

@jafow
Created January 14, 2016 02:38
Show Gist options
  • Save jafow/72fb30c47aaf497a31a7 to your computer and use it in GitHub Desktop.
Save jafow/72fb30c47aaf497a31a7 to your computer and use it in GitHub Desktop.
matchElements
/**Some of the image URLs in the datastore are broken. This ```matchElements``` function returns a new array of valid URLs that match the ``@param {Regex} match` object.
*/
const matchElements = (arr) =>
function (match) {
return arr.filter((str) => match.test(str))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment