UNPKG

@activecollab/components

Version:

ActiveCollab Components

16 lines (15 loc) 564 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.sanitizeAndTrim = void 0; /** * Sanitizes a string by replacing non-breaking spaces and other special whitespace * with standard spaces, then trims the result. */ var sanitizeAndTrim = exports.sanitizeAndTrim = function sanitizeAndTrim(value) { return value.replace(/\u00a0/g, " ") // Replace   (\u00a0) .replace(/\s+/g, " ") // Replace multiple whitespace with single space .trim(); // Trim leading/trailing whitespace }; //# sourceMappingURL=stringUtils.js.map