import bcrypt from 'bcrypt'; const SALT_ROUNDS = 10; function hash(text) { return bcrypt.hash(text, SALT_ROUNDS); } function compare(text, hash) { return bcrypt.compare(text, hash); } export default { hash, compare }