Wouldn't some other feedback actually be better? If your JavaScript can calculate the Luhn checksum, and then give a checkmark or something, you've actually done better than just checking the card number's first few digits.
Very true. But is there a reason that's better than a checkmark? It just doesn't seem like a user cares what card type they've entered. They already know since they got the card out.