function match(path, filter) {
  if (!(path instanceof NodePath)) {
    if (typeof path.get === 'function') {
      path = path.get();
    } else {
      path = {value: path};
    }
  }
  return matchNode(path.value, filter);
}
Utility function to match a node against a pattern.
@augments core
@static
@param {Node|NodePath|Object} path
@parma {Object} filter
@return boolean