From a7044e3e8bb2308ac0f74264d01951aeaca0d66f Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Sun, 20 Feb 2022 21:59:14 +0100 Subject: [PATCH] [minor] Use more descriptive variable name --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index aa71e5d..ec6091a 100644 --- a/index.js +++ b/index.js @@ -2,11 +2,11 @@ var required = require('requires-port') , qs = require('querystringify') + , controlOrWhitespace = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/ , CRHTLF = /[\n\r\t]/g , slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\// , protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i - , windowsDriveLetter = /^[a-zA-Z]:/ - , whitespace = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/; + , windowsDriveLetter = /^[a-zA-Z]:/; /** * Trim a given string. @@ -15,7 +15,7 @@ var required = require('requires-port') * @public */ function trimLeft(str) { - return (str ? str : '').toString().replace(whitespace, ''); + return (str ? str : '').toString().replace(controlOrWhitespace, ''); } /**