get the uuid package to get uuid v6, v7 versions of uuid using gouuidjs - wasm port of google uuid package
the demos can be found in the folder demos
const fs = require('node:fs');
const wasmBuffer = fs.readFileSync('.node_modules/gouuid/gouuid.wasm');
WebAssembly.instantiate(wasmBuffer).then(wasmModule => {
const go = wasmModule.instance.exports;
const uuid = go.GetUUID(["", "V7"]);
console.log(uuid);
});
import { GetUUID } from '../gouuid.wasm';
console.log(GetUUID([".", "."]))
import * as go from '../gouuid.wasm';
console.log(go.GetUUID([".", "."]))
Direct build od UUID definition implementations from github.com/google/uuid