1// src/app/_shared/job-create.util.ts 2function generateId(prefix) { 3 const time = Date.now().toString(36); 4 const rand = Math.floor(Math.random() * 1e6).toString(36); 5 return `${prefix}-${time}-${rand}`.toUpperCase(); 6} 7function generateRequisitionId() { 8 return generateId("REQ"); 9} 10function htmlToPlainText(html) { 11 if (!html) 12 return ""; 13 const tmp = document.createElement("div"); 14 tmp.innerHTML = html; 15 return (tmp.textContent ?? "").replace(/\s+/g, " ").trim(); 16} 17function toNumberOrNull(value) { 18 if (value === null || value === void 0 || value === "") 19 return null; 20 const num = Number(value); 21 return Number.isFinite(num) ? num : null; 22} 23function trimOrNull(value) { 24 const trimmed = (value ?? "").trim(); 25 return trimmed.length ? trimmed : null; 26} 27 28export { 29 generateId, 30 generateRequisitionId, 31 htmlToPlainText, 32 toNumberOrNull, 33 trimOrNull 34}; 35/**i18n:55a58011b6fcf12b70aba021cbe233ce2fe179902ce3502a5c6547ccaba0ed7f*/ 36//# sourceMappingURL=chunk-NDC36KWU.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.