UNPKG

738 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.MockServerHelper = void 0;
4let id = 0;
5/* eslint-disable class-methods-use-this */
6class MockServerHelper {
7 /**
8 * Returns random integer between min and max.
9 * @param min Minimum value that is used for calculation
10 * @param max Maximum value that is used for calculation
11 */
12 getRandomInt(min = 0, max = 2147483648) {
13 return Math.floor(Math.random() * (max - min + 1)) + min;
14 }
15 /** Returns unique integer */
16 getUniqueIdInt() {
17 return ++id;
18 }
19}
20exports.MockServerHelper = MockServerHelper;
21const mockServerHelper = new MockServerHelper();
22exports.default = mockServerHelper;