UNPKG

test-file-generator

Version:

Generates different file types for testing purposes. The content of the files is generated with a random function.

14 lines (13 loc) 489 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getRandomInt = exports.getRandomID = void 0; function getRandomID() { return Math.random().toString(36).substring(2, 36); } exports.getRandomID = getRandomID; function getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min) + min); // The maximum is exclusive and the minimum is inclusive } exports.getRandomInt = getRandomInt;