1 | var uniqueExec = require('../vendor/unique');
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | function Unique (faker) {
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | var maxTime = 10;
|
12 |
|
13 |
|
14 | var maxRetries = 10;
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | |
20 |
|
21 |
|
22 |
|
23 |
|
24 | this.unique = function unique (method, args, opts) {
|
25 | opts = opts || {};
|
26 | opts.startTime = new Date().getTime();
|
27 | if (typeof opts.maxTime !== 'number') {
|
28 | opts.maxTime = maxTime;
|
29 | }
|
30 | if (typeof opts.maxRetries !== 'number') {
|
31 | opts.maxRetries = maxRetries;
|
32 | }
|
33 | opts.currentIterations = 0;
|
34 | return uniqueExec.exec(method, args, opts);
|
35 | }
|
36 | }
|
37 |
|
38 | module['exports'] = Unique; |
\ | No newline at end of file |