File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,13 @@ const UUID_REGEX = /^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f
26
26
27
27
async function hashStringToUuid ( input : string ) : Promise < string > {
28
28
const buf = await crypto . subtle . digest ( 'SHA-1' , new TextEncoder ( ) . encode ( input ) ) ;
29
- return Array . from ( new Uint8Array ( buf ) )
30
- // We only need the first 16 bytes for the 32 characters
31
- . slice ( 0 , 16 )
32
- . map ( b => b . toString ( 16 ) . padStart ( 2 , '0' ) )
33
- . join ( '' ) ;
29
+ return (
30
+ Array . from ( new Uint8Array ( buf ) )
31
+ // We only need the first 16 bytes for the 32 characters
32
+ . slice ( 0 , 16 )
33
+ . map ( b => b . toString ( 16 ) . padStart ( 2 , '0' ) )
34
+ . join ( '' )
35
+ ) ;
34
36
}
35
37
36
38
async function propagationContextFromInstanceId ( instanceId : string ) : Promise < PropagationContext > {
You can’t perform that action at this time.
0 commit comments