optimize random_string
This commit is contained in:
		
							
								
								
									
										1
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								index.js
									
									
									
									
									
								
							@@ -39,7 +39,6 @@ function random_string (len = 8) {
 | 
			
		||||
    throw new Error ('invalid length');
 | 
			
		||||
  return crypto.randomBytes (Math.ceil (len * 3 / 4))
 | 
			
		||||
    .toString ('base64')
 | 
			
		||||
    .replace (/[=]+$/u, '')
 | 
			
		||||
    .substr (0, len);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ module.exports = function(config) {
 | 
			
		||||
  config.set({
 | 
			
		||||
    mutator: "javascript",
 | 
			
		||||
    packageManager: "yarn",
 | 
			
		||||
    reporters: ["clear-text"],
 | 
			
		||||
    reporters: ["clear-text", "progress"],
 | 
			
		||||
    testRunner: "command",
 | 
			
		||||
    transpilers: [],
 | 
			
		||||
    coverageAnalysis: "all",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user