File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1-
21export function generateUUID ( ) : string {
3- if ( typeof crypto !== " undefined" && typeof crypto . randomUUID === " function" ) {
4- return crypto . randomUUID ( ) ;
5- }
2+ if ( typeof crypto !== ' undefined' && typeof crypto . randomUUID === ' function' ) {
3+ return crypto . randomUUID ( ) ;
4+ }
65
7- // Fallback (non cryptographique)
8- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' . replace ( / [ x y ] / g, function ( c ) {
9- const r = Math . random ( ) * 16 | 0 ;
10- const v = c === 'x' ? r : ( r & 0x3 | 0x8 ) ;
11- return v . toString ( 16 ) ;
12- } ) ;
13- }
6+ // Fallback (non cryptographique)
7+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' . replace ( / [ x y ] / g, function ( c : string ) {
8+ const r = ( Math . random ( ) * 16 ) | 0 ;
9+ const v = c === 'x' ? r : ( r & 0x3 ) | 0x8 ;
10+ return v . toString ( 16 ) ;
11+ } ) ;
12+ }
Original file line number Diff line number Diff line change 1414 "label-position" : true ,
1515 "no-any" : true ,
1616 "no-arg" : true ,
17- "no-bitwise" : true ,
17+ "no-bitwise" : false ,
1818 "no-console" : [
1919 false ,
2020 " log" ,
You can’t perform that action at this time.
0 commit comments