Sync uuid from string

How can I generate a UUID from a string synchronously? In the standard library I only found this async module https://deno.land/std@0.160.0/uuid/v5.ts?s=generate
C
crowlKats551d ago
Crypto.randomUUID() - Web APIs | MDN
The randomUUID() method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator.
V
vwkd551d ago
@crowlkats Thanks, I don’t need a random one but one that’s replicable from a input string.
C
crowlKats551d ago
oh my bad
I
iuioiua551d ago
You’ll have to create your own generateSync function using crypto.subtle.digestSync.
V
vwkd551d ago
I ended up using uuid-by-string from NPM https://www.npmjs.com/package/uuid-by-string
npm
uuid-by-string
Generating uuid-hash from string. Latest version: 4.0.0, last published: a month ago. Start using uuid-by-string in your project by running npm i uuid-by-string. There are 76 other projects in the npm registry using uuid-by-string.
More Posts
VS Code, Hello World -- F5 shows nothing in console?I have a simple hello world program: ```ts let message: string = 'Hello World'; console.log(messageHow to transform a Readable Stream to a file.I have a ReadableStream from a post request and i cant find a way to transform the body(ReadableStreSilence error logs on Oak serverI'm trying to silence specific errors on an Oak server on Deploy. A Github issue said to add an 'errAre pointers supported in Fast API return types?If no, how do I return pointers?Reddit fetch Vs. My noob brain part. IHello! So I want to fetch Reddit posts. I use this library. I have a few questions. https://github.cHow do I detect mouse clicks and key presses with Deno.stdin?I don't even really have any base code, so I was just wondering as to how do I do the problem specifML with FFISuppose you wish to do some machine learning stuff with Deno, would it be optimal to use FFI with C Is there a way to determine what modules have been dynamically imported at runtime?The builtin tools to compile/bundle/vendor don't account for dynamic imports (understandably), but iweird interfacehow can a class implement this interface ```ts interface I { (): void type: string }``` or a `cnpm specifier import typesso when I do something like ```ts import * as rx from 'npm:rxjs' console.log(rx) ``` I do have the error Unsupported scheme node for module `nodemodule`. Supported schemesI'm trying to import a module using: ```js import { example } from "npm:example"; ``` Inside `examplesbuild_deno_loader importing Deno modulesA dependancy I use imports modules like "fs" and I want esbuild_deno_loader to treat them as externa