Heck, does a cantrip work on a magic item (and is a spellbook a magic item?!)?!
For this one, the answer is "no", at least by default. Note that some spellbooks may well be layered with various traps and protective spells and so may
become a magic item.
For the rest of it...
What repercussions are there to having a spellbook get soaked all the way through, do you think? Does the ink run?
It's really up to you. And since it's happened to an NPC, I would suggest asking yourself, "what's most interesting?" You might want to bring that NPC back as an increasingly-desperate Wizard who has lost his spellbook and is now trying to steal one from the PCs, or perhaps he's out for revenge, or something. Or you might not care.
If it was a PC's spellbook, I'd be inclined to be much more generous, and only have the book damaged if it suffered serious immersion for a decent spell of time. Because loss of a spellbook is pretty devastating to a Wizard, even in 5e, and you probably don't want the next several sessions to become "Bob's efforts to get a new spellbook" to the exclusion of all else.
Are spells lost? Does the book fall apart and become unusable in two months?
In the event of long-term immersion, this is pretty much exactly what I'd go with.
Or does a simple prestidigitation dry it out? Heck, does a cantrip work on a magic item (and is a spellbook a magic item?!)?!
For anything less than that long-term immersion, this is what I'd recommend.
(Alternately, one thing I've considered is breaking the link between the Wizard's spellbook and his "spells known" - that is, allow the Wizard to 'know' any spells in any spellbook he can read (up to his maximum allowed known, of course). That means that a spellbook loss is much less devastating in general provided he can quickly get
any other spellbook, although he may now find he can cast a different selection of spells as a result.)