File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
- 'use strict'
1
+ 'use strict' ;
2
2
function randomString ( length ) {
3
- if ( ! length ) length = Math . ceil ( Math . random ( ) * 10 * 2 )
3
+ if ( ! length ) length = Math . ceil ( Math . random ( ) * 10 * 2 ) ;
4
4
var string = '' ,
5
5
allowedCharacters =
6
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*'
7
- const allowedCharactersLength = allowedCharacters . length
6
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*' ;
7
+ var allowedCharactersLength = allowedCharacters . length ;
8
8
for ( var i = 0 ; i < length ; i ++ )
9
9
string += allowedCharacters . charAt (
10
10
Math . floor ( Math . random ( ) * allowedCharactersLength )
11
- )
12
- return string
11
+ ) ;
12
+ return string ;
13
13
}
14
14
15
- module . exports = randomString
15
+ module . exports = randomString ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @smakss/random-string" ,
3
- "version" : " 1.0.7 " ,
3
+ "version" : " 1.0.8 " ,
4
4
"description" : " Generates random dummy string." ,
5
5
"type" : " module" ,
6
6
"main" : " index.cjs" ,
13
13
"url" : " git+https://github.com/SMAKSS/random-string.git"
14
14
},
15
15
"keywords" : [
16
- " ES5" ,
17
- " ES6" ,
18
16
" npm" ,
19
17
" yarn" ,
20
18
" dummy" ,
21
19
" string" ,
22
20
" SMAKSS" ,
23
21
" random" ,
22
+ " CommonJS" ,
23
+ " EcmaScript" ,
24
24
" random-string"
25
25
],
26
26
"author" : " SMAKSS" ,
You can’t perform that action at this time.
0 commit comments