From 272dff9271bba55d84b08f1dbb9056a2fdcbe164 Mon Sep 17 00:00:00 2001 From: Oscar Date: Fri, 11 Apr 2025 12:03:52 +0200 Subject: [PATCH] Extract uuid to a separate file --- helpers/mu/index.js | 5 +---- helpers/mu/uuid.js | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 helpers/mu/uuid.js diff --git a/helpers/mu/index.js b/helpers/mu/index.js index d8a40f4..63a9256 100644 --- a/helpers/mu/index.js +++ b/helpers/mu/index.js @@ -1,9 +1,6 @@ import { app, errorHandler } from './server.js'; import sparql from './sparql.js'; -import { v1 as uuidV1 } from 'uuid'; - -// generates a uuid -const uuid = uuidV1; +import uuid from './uuid.js'; const mu = { app: app, diff --git a/helpers/mu/uuid.js b/helpers/mu/uuid.js new file mode 100644 index 0000000..e4832aa --- /dev/null +++ b/helpers/mu/uuid.js @@ -0,0 +1,6 @@ +import { v1 as uuidV1 } from 'uuid'; + +// generates a uuid +const uuid = uuidV1; + +export { uuid };