File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
packages/vite-plugin-svelte/src/utils Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ module.exports = {
53
53
}
54
54
] ,
55
55
'node/no-deprecated-api' : 'off' ,
56
+ 'no-restricted-properties' : [
57
+ 'error' ,
58
+ { property : 'substr' , message : 'Use .slice instead of .substr.' }
59
+ ] ,
56
60
'node/no-unpublished-import' : 'off' ,
57
61
'node/no-unpublished-require' : 'off' ,
58
62
'node/no-unsupported-features/es-syntax' : 'off' ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export function safeBase64Hash(input: string) {
14
14
// OR DON'T USE A HASH AT ALL, what about a simple counter?
15
15
const md5 = crypto . createHash ( 'md5' ) ;
16
16
md5 . update ( input ) ;
17
- const hash = toSafe ( md5 . digest ( 'base64' ) ) . substr ( 0 , hash_length ) ;
17
+ const hash = toSafe ( md5 . digest ( 'base64' ) ) . slice ( 0 , hash_length ) ;
18
18
hashes [ input ] = hash ;
19
19
return hash ;
20
20
}
You can’t perform that action at this time.
0 commit comments