8ef1c409346d4ad17777e369dd8ecfdaa51ea372af462582b150a587c0d03750ffa9209b54a5cad9a74454ea9b877e6bc84b4b9e05571ca1e93b8f2cd1c2b1 168 B

12345678910
  1. 'use strict';
  2. module.exports = function (str) {
  3. var tail = str.length;
  4. while (/[\s\uFEFF\u00A0]/.test(str[tail - 1])) {
  5. tail--;
  6. }
  7. return str.slice(0, tail);
  8. };