File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,7 @@ var required = require('requires-port')
6
6
, slashes = / ^ [ A - Z a - z ] [ A - Z a - z 0 - 9 + - . ] * : \/ \/ /
7
7
, protocolre = / ^ ( [ a - z ] [ a - z 0 - 9 . + - ] * : ) ? ( \/ \/ ) ? ( [ \\ / ] + ) ? ( [ \S \s ] * ) / i
8
8
, windowsDriveLetter = / ^ [ a - z A - Z ] : /
9
- , whitespace = '[\\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
- , left = new RegExp ( '^' + whitespace + '+' ) ;
9
+ , whitespace = / ^ [ \f \n \r \t \v \u00a0 \u1680 \u2000 - \u200a \u2028 \u2029 \u202f \u205f \u3000 \ufeff ] + / ;
11
10
12
11
/**
13
12
* Trim a given string.
@@ -16,7 +15,7 @@ var required = require('requires-port')
16
15
* @public
17
16
*/
18
17
function trimLeft ( str ) {
19
- return ( str ? str : '' ) . toString ( ) . replace ( left , '' ) ;
18
+ return ( str ? str : '' ) . toString ( ) . replace ( whitespace , '' ) ;
20
19
}
21
20
22
21
/**
You can’t perform that action at this time.
0 commit comments