Skip to content

Commit

Permalink
deterministic check
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGOrtega committed Jul 10, 2022
1 parent 4e9ac5d commit e569c3b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const {
const ID_DO_NOT_TRACK = 'do-not-track';

const deterministic = async (data) => {
if (!data) throw new Error('data is not set calculating deterministic uuid');

const namespace = uuidv5('iterative.ai', uuidv5.DNS);
const name = await promisify(scrypt)(data, parse(namespace), 8, {
N: 1 << 16,
Expand Down

1 comment on commit e569c3b

@github-actions

This comment was marked as off-topic.

Please sign in to comment.