Sha256: e4a5dc1a81e31aa4830192a90a09dc8f760405f760f03d4280980cf6af4e8c75
Contents?: true
Size: 435 Bytes
Versions: 375
Compression:
Stored size: 435 Bytes
Contents
/* global text */ /** * Removes carriage returns, newline characters, tabs, non-breaking spaces, and trailing spaces from string * @method sanitize * @memberof axe.commons.text * @instance * @param {String} str String to be cleaned * @return {String} Sanitized string */ text.sanitize = function(str) { 'use strict'; return str .replace(/\r\n/g, '\n') .replace(/\u00A0/g, ' ') .replace(/[\s]{2,}/g, ' ') .trim(); };
Version data entries
375 entries across 375 versions & 1 rubygems