Every line of 'faker random number' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
294 export function randomNumber(lessThan = 52) { 295 const seed = Math.random(); 296 return parseInt(seed * lessThan); 297 }
6 function randomNumber() { 7 return parseInt(Math.random() * 100, 10); 8 }
2 create() { 3 let min = 111111111; 4 let max = 999999999; 5 return Math.floor(Math.random() * (max - min) + min); 6 }
4 function randomNumber() { 5 return Math.floor(Math.random()*100) 6 }
8 function randomNumber(min, max) { 9 return Math.floor(Math.random() * (max - min + 1)) + min; 10 }
4 function randomNumber(min, max) { 5 return Math.random() * (max - min) + min; 6 }
82 function randomNumber(min, max) { 83 return Math.random() * (max - min) + min; 84 }
68 function randomNumber(boundary) { 69 return parseInt(Math.random() * boundary); 70 //return Math.floor(Math.random() * boundary); 71 }
39 function randomNumber(start, end) { 40 return Math.floor(Math.random() * end) + start; 41 }
23 function random(params: paramsEntity = {}): number { 24 const { min = 500, max = 10000, floor = false } = params; 25 const num = Math.random() * (max - min) + min; 26 return floor ? Math.floor(num) : num; 27 }