npm module: class for building hashes