Skip to content

Commit a7044e3

Browse files
committed
[minor] Use more descriptive variable name
1 parent d547792 commit a7044e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
var required = require('requires-port')
44
, qs = require('querystringify')
5+
, controlOrWhitespace = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/
56
, CRHTLF = /[\n\r\t]/g
67
, slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//
78
, protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i
8-
, windowsDriveLetter = /^[a-zA-Z]:/
9-
, whitespace = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/;
9+
, windowsDriveLetter = /^[a-zA-Z]:/;
1010

1111
/**
1212
* Trim a given string.
@@ -15,7 +15,7 @@ var required = require('requires-port')
1515
* @public
1616
*/
1717
function trimLeft(str) {
18-
return (str ? str : '').toString().replace(whitespace, '');
18+
return (str ? str : '').toString().replace(controlOrWhitespace, '');
1919
}
2020

2121
/**

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy