modify-qris
Version:
Modify QRIS Generator is a javascript based libraries that enabling flexible payments with customizable amounts for improved efficiency and user experience
20 lines (19 loc) • 520 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Text = void 0;
/**
* Text class for sanitizing string inputs
*/
class Text {
/**
* Sanitizes a string by removing newlines, carriage returns and trimming whitespace
* @param input The string to sanitize
* @returns The sanitized string
*/
static sanitize(input) {
input = input.replace(/\n/g, '');
input = input.replace(/\r/g, '');
return input.trim();
}
}
exports.Text = Text;