1.4.0 • Published 2 years ago
@bonniernews/persistent-hash v1.4.0
persistent-hash
Bonnier news library for hashing user_ids.
Usage
const { createPersistentHashedId } = require('@bonniernews/persistent-hash');or
import { createPersistentHashedId } from '@bonniernews/persistent-hash';Example
async function hashUserID(id) {
try {
const hashedId = await createPersistentHashedId(id);
return hashedId;
} catch (error) {
console.error('Error hashing the user ID:', error);
throw error;
}
}