forked from AuthorizeNet/sample-code-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.js
More file actions
27 lines (21 loc) · 657 Bytes
/
utils.js
File metadata and controls
27 lines (21 loc) · 657 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
'use strict';
function getRandomString(text){
return text + Math.floor((Math.random() * 100000) + 1);
}
function getRandomInt(){
return Math.floor((Math.random() * 100000) + 1);
}
function getRandomAmount(){
return ((Math.random() * 100) + 1).toFixed(2);
}
function getDate(){
return (new Date()).toISOString().substring(0, 10) ;
}
const _getRandomString = getRandomString;
export { _getRandomString as getRandomString };
const _getRandomInt = getRandomInt;
export { _getRandomInt as getRandomInt };
const _getRandomAmount = getRandomAmount;
export { _getRandomAmount as getRandomAmount };
const _getDate = getDate;
export { _getDate as getDate };