How do salt and initialization vector differ? Reading through the NodeJS API docs I came across IV for the first time. From what I can tell it has the same role as a salt in password hashing? Are they equivalent?
The term salt and IV are indeed largely used to provide the same functionality. They differ mainly for the type of algorithm. Both are used to ensure that the output is not purely determined by the input.
IV's or salts don't necessarily have to be random, they may just be unique. In that case the functions output is pseudo-random; the randomness is taken from the entropy in the key material (or password) instead. The requirements (the output size, if they need to be randomized or not) for the salt and IV depend on the algorithm used.
The term IV - Initialization Vector - is generally associated with block cipher modes of operation. Most of these modes use some kind of chaining of operations. As the name implies the IV is just the &quot;first vector&quot;. This can be most easily shown by looking at CBC-mode of operation: here every plaintext block is XOR'ed with the previous ciphertext  block (the vector) before it is fed into the block cipher, but the first plaintext block is XOR'ed with the IV instead.
Salt is a more generic term which is often used in combination with KDF and KDF-related algorithms. You'll often see the term mentioned in combination with password hashing (i.e. a PBKDF) and password based encryption (PBE). The salt is then used to derive unique key material. You may also see the term salt used for other pseudo-random functions such as MGF1 which is used for modern RSA encryption (RSA-OAEP) and signature generation (RSA-PSS).