code: function findMatchingBucket(mod, ignore, bucketsContext) {
    var match = null;
  
    if (!mod.resource) {
      return match;
    }
  
    var resourcePath = mod.resource;
    for (var i in ignore) {
      if (ignore[i].test(resourcePath)) {
        return match;
      }
    }
  
    bucketsContext.some(function (bucket) {
      return bucket.path.some(function (path) {
        if (path.test(resourcePath)) {
          match = bucket;
          return true;
        }
      });
    });
  
    return match;
  }
docs: test the target module whether it matches one of the user specified
  bucket paths
  
  @param {Module} mod
  @param {String[]} ignore
  @param {Bucket[]} bucketsContext
  @returns {Bucket}