test-polyfill.js 234 B

123456789
  1. if (!String.prototype.trim) {
  2. (function() {
  3. // Make sure we trim BOM and NBSP
  4. var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
  5. String.prototype.trim = function() {
  6. return this.replace(rtrim, '');
  7. };
  8. })();
  9. }