Create a JavaScript function that takes a string as input and checks if it's a valid IPv4 address. Return true if it's valid, false otherwise.

function isValidIPv4(str) {
  const regex = /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
  return regex.test(str);
}

// Example usage:
console.log(isValidIPv4("192.168.1.1")); // true
console.log(isValidIPv4("255.255.255.255")); // true
console.log(isValidIPv4("256.0.0.0")); // false