UNPKG

@ovotech/genesys-web-messaging-tester-cli

Version:
16 lines (15 loc) 493 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createFilename = exports.sanitise = void 0; const SEPARATOR = '-'; function sanitise(text) { return `${text}` .toLowerCase() .replace(/\s/g, SEPARATOR) .replace(/[^a-z0-9\-_]/gi, ''); } exports.sanitise = sanitise; function createFilename(scenarioName) { return sanitise([scenarioName, Date.now()].filter((e) => e).join(SEPARATOR)); } exports.createFilename = createFilename;