Commit 1286f03 1 parent d7e9a8e commit 1286f03 Copy full SHA for 1286f03
File tree 5 files changed +42
-31
lines changed
5 files changed +42
-31
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " unique-filename" ,
3
- "version" : " 2.0.0 " ,
3
+ "version" : " 2.0.1 " ,
4
4
"description" : " Generate a unique filename for use in temporary directories or caches." ,
5
5
"main" : " lib/index.js" ,
6
6
"scripts" : {
32
32
"tap" : " ^16.3.0"
33
33
},
34
34
"dependencies" : {
35
- "unique-slug" : " ^2 .0.2 "
35
+ "unique-slug" : " ^3 .0.0 "
36
36
},
37
37
"files" : [
38
38
" bin/" ,
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ var MurmurHash3 = require('imurmurhash')
4
4
module . exports = function ( uniq ) {
5
5
if ( uniq ) {
6
6
var hash = new MurmurHash3 ( uniq )
7
- return ( '00000000' + hash . result ( ) . toString ( 16 ) ) . substr ( - 8 )
7
+ return ( '00000000' + hash . result ( ) . toString ( 16 ) ) . slice ( - 8 )
8
8
} else {
9
- return ( Math . random ( ) . toString ( 16 ) + '0000000' ) . substr ( 2 , 8 )
9
+ return ( Math . random ( ) . toString ( 16 ) + '0000000' ) . slice ( 2 , 10 )
10
10
}
11
11
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " unique-slug" ,
3
- "version" : " 2 .0.2 " ,
3
+ "version" : " 3 .0.0 " ,
4
4
"description" : " Generate a unique character string suitible for use in files and URLs." ,
5
- "main" : " index.js" ,
5
+ "main" : " lib/ index.js" ,
6
6
"scripts" : {
7
- "test" : " standard && tap --coverage test"
7
+ "test" : " tap" ,
8
+ "lint" : " eslint \" **/*.js\" " ,
9
+ "postlint" : " template-oss-check" ,
10
+ "template-oss-apply" : " template-oss-apply --force" ,
11
+ "lintfix" : " npm run lint -- --fix" ,
12
+ "preversion" : " npm test" ,
13
+ "postversion" : " npm publish" ,
14
+ "prepublishOnly" : " git push origin --follow-tags" ,
15
+ "snap" : " tap" ,
16
+ "posttest" : " npm run lint"
8
17
},
9
18
"keywords" : [],
10
- "author" : " Rebecca Turner <me@re-becca.org> (http://re-becca.org) " ,
19
+ "author" : " GitHub Inc. " ,
11
20
"license" : " ISC" ,
12
21
"devDependencies" : {
13
- "standard" : " ^12.0.1" ,
14
- "tap" : " ^12.7.0"
22
+ "@npmcli/eslint-config" : " ^3.1.0" ,
23
+ "@npmcli/template-oss" : " 3.5.0" ,
24
+ "tap" : " ^16.3.0"
15
25
},
16
26
"repository" : {
17
27
"type" : " git" ,
18
- "url" : " git ://github.com/iarna /unique-slug.git"
28
+ "url" : " https ://github.com/npm /unique-slug.git"
19
29
},
20
30
"dependencies" : {
21
31
"imurmurhash" : " ^0.1.4"
32
+ },
33
+ "files" : [
34
+ " bin/" ,
35
+ " lib/"
36
+ ],
37
+ "engines" : {
38
+ "node" : " ^12.13.0 || ^14.15.0 || >=16.0.0"
39
+ },
40
+ "templateOSS" : {
41
+ "//@npmcli/template-oss" : " This file is partially managed by @npmcli/template-oss. Edits may be overwritten." ,
42
+ "version" : " 3.5.0"
22
43
}
23
44
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 9916
9916
}
9917
9917
},
9918
9918
"node_modules/unique-filename" : {
9919
- "version" : " 2.0.0 " ,
9920
- "resolved" : " https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.0 .tgz" ,
9921
- "integrity" : " sha512-tpzoz2RpZ//6Zt4GPpOFTyrnfZuSvjIfe8lvx6Thp4yTQwJtAFwPlssEBE62VhGA2We5/COyNpcIu+OABu3/Yg ==" ,
9919
+ "version" : " 2.0.1 " ,
9920
+ "resolved" : " https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1 .tgz" ,
9921
+ "integrity" : " sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A ==" ,
9922
9922
"inBundle" : true ,
9923
9923
"dependencies" : {
9924
- "unique-slug" : " ^2 .0.2 "
9924
+ "unique-slug" : " ^3 .0.0 "
9925
9925
},
9926
9926
"engines" : {
9927
9927
"node" : " ^12.13.0 || ^14.15.0 || >=16.0.0"
9928
9928
}
9929
9929
},
9930
9930
"node_modules/unique-slug" : {
9931
- "version" : " 2 .0.2 " ,
9932
- "resolved" : " https://registry.npmjs.org/unique-slug/-/unique-slug-2 .0.2 .tgz" ,
9933
- "integrity" : " sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w ==" ,
9931
+ "version" : " 3 .0.0 " ,
9932
+ "resolved" : " https://registry.npmjs.org/unique-slug/-/unique-slug-3 .0.0 .tgz" ,
9933
+ "integrity" : " sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w ==" ,
9934
9934
"inBundle" : true ,
9935
9935
"dependencies" : {
9936
9936
"imurmurhash" : " ^0.1.4"
9937
+ },
9938
+ "engines" : {
9939
+ "node" : " ^12.13.0 || ^14.15.0 || >=16.0.0"
9937
9940
}
9938
9941
},
9939
9942
"node_modules/unist-builder" : {
You can’t perform that action at this time.
0 commit comments