File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 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')
66 , slashes = / ^ [ A - Z a - z ] [ A - Z a - z 0 - 9 + - . ] * : \/ \/ /
77 , protocolre = / ^ ( [ a - z ] [ a - z 0 - 9 . + - ] * : ) ? ( \/ \/ ) ? ( [ \\ / ] + ) ? ( [ \S \s ] * ) / i
88 , 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 ] + / ;
1110
1211/**
1312 * Trim a given string.
@@ -16,7 +15,7 @@ var required = require('requires-port')
1615 * @public
1716 */
1817function trimLeft ( str ) {
19- return ( str ? str : '' ) . toString ( ) . replace ( left , '' ) ;
18+ return ( str ? str : '' ) . toString ( ) . replace ( whitespace , '' ) ;
2019}
2120
2221/**
You can’t perform that action at this time.
0 commit comments