I have a few functions like this:
function filterNegaMatch (myArray, matchCriteria) {
var v_regexp = new RegExp(matchCriteria,"gi")
return myArray.filter(function(candidateLine) {
return !(candidateLine.match(v_regexp));
});
}
I use it already in that one action, but if I am going on to build other actions, should I keep pasting separate copies or is there a way to reference this code from another script?