1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

typo-hunting v2

This commit is contained in:
silversword411 2022-07-19 16:24:59 -04:00
parent ea51ae8dcb
commit 311965089e
No known key found for this signature in database
GPG key ID: CF805301BBB8CC0C
4 changed files with 8 additions and 8 deletions

View file

@ -106,7 +106,7 @@ module.exports.random = function (max) {
return r;
};
// Split a comma seperated string, ignoring commas in quotes.
// Split a comma separated string, ignoring commas in quotes.
module.exports.quoteSplit = function (str) {
var tmp = '', quote = 0, result = [];
for (var i in str) { if (str[i] == '"') { quote = (quote + 1) % 2; } if ((str[i] == ',') && (quote == 0)) { tmp = tmp.trim(); result.push(tmp); tmp = ''; } else { tmp += str[i]; } }