main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
644 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var callBound = require('call-bind/callBound');
|
---|
4 | var $replace = callBound('String.prototype.replace');
|
---|
5 |
|
---|
6 | var mvsIsWS = (/^\s$/).test('\u180E');
|
---|
7 | /* eslint-disable no-control-regex */
|
---|
8 | var endWhitespace = mvsIsWS
|
---|
9 | ? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/
|
---|
10 | : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;
|
---|
11 | /* eslint-enable no-control-regex */
|
---|
12 |
|
---|
13 | module.exports = function trimEnd() {
|
---|
14 | return $replace(this, endWhitespace, '');
|
---|
15 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.