code: function getUnusedBinding(path, name) {
    let binding = path.scope.getBinding(name);
    if (!binding) {
      return null;
    }
  
    let pure = isPure(binding);
    if (!binding.referenced && pure) {
      return binding;
    }
  
    // Is there any references which aren't simple assignments?
    let bailout = binding.referencePaths.some(
      path => !isExportAssignment(path) && !isUnusedWildcard(path)
    );
  
    if (!bailout && pure) {
      return binding;
    }
  
    return null;
  }
docs: Check if a binding is safe to remove and returns it if it is.